Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
Export Criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Jun 1, 2020
1 parent 239472b commit 1ea150b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "shopware-admin-api",
"version": "0.0.1",
"version": "0.0.2",
"description": "Shopware API",
"main": "index.js",
"main": "src/index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import axios from 'axios';
import Api from './api.js';
export {default as Criteria} from './data/criteria.data.js';

export async function createFromPasswordAndLogin(url, username, password, version) {
version = version || 1;
Expand All @@ -14,7 +15,7 @@ export async function createFromPasswordAndLogin(url, username, password, versio
password: password
});
} catch(err) {
if (err.response.status === 401) {
if (err.response && err.response.status === 401) {
throw new Error('Invalid credentials');
}

Expand Down

0 comments on commit 1ea150b

Please sign in to comment.