Added basic login.

This commit is contained in:
2024-02-29 05:08:54 +01:00
parent 76a831eb50
commit 78b389e33a
21 changed files with 3553 additions and 189 deletions

View File

@@ -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);
}