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

Commit 1ea150b

Browse files
committed
Export Criteria
1 parent 239472b commit 1ea150b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "shopware-admin-api",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Shopware API",
5-
"main": "index.js",
5+
"main": "src/index.js",
66
"type": "module",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1"

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import axios from 'axios';
22
import Api from './api.js';
3+
export {default as Criteria} from './data/criteria.data.js';
34

45
export async function createFromPasswordAndLogin(url, username, password, version) {
56
version = version || 1;
@@ -14,7 +15,7 @@ export async function createFromPasswordAndLogin(url, username, password, versio
1415
password: password
1516
});
1617
} catch(err) {
17-
if (err.response.status === 401) {
18+
if (err.response && err.response.status === 401) {
1819
throw new Error('Invalid credentials');
1920
}
2021

0 commit comments

Comments
 (0)