Added basic login.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { parse } from '@brillout/json-serializer/parse';
|
||||
import { parse } from '@brillout/json-serializer/parse'; /* eslint-disable-line import/extensions */
|
||||
|
||||
const postHeaders = {
|
||||
mode: 'cors',
|
||||
@@ -26,7 +26,7 @@ export async function get(path, query = {}) {
|
||||
return body;
|
||||
}
|
||||
|
||||
throw new Error(body.message);
|
||||
throw new Error(body.statusMessage);
|
||||
}
|
||||
|
||||
export async function post(path, data, { query } = {}) {
|
||||
@@ -66,7 +66,7 @@ export async function patch(path, data, { query } = {}) {
|
||||
return body;
|
||||
}
|
||||
|
||||
throw new Error(body.message);
|
||||
throw new Error(body.statusMessage);
|
||||
}
|
||||
|
||||
export async function del(path, { data, query } = {}) {
|
||||
@@ -86,5 +86,5 @@ export async function del(path, { data, query } = {}) {
|
||||
return body;
|
||||
}
|
||||
|
||||
throw new Error(body.message);
|
||||
throw new Error(body.statusMessage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user