Additional changes for the merge

This commit is contained in:
Kagami Sascha Rosylight 2023-03-25 08:13:30 +01:00
parent 3b524f32bf
commit efb5e1d1cc
27 changed files with 1048 additions and 11178 deletions

View file

@ -1,4 +1,4 @@
import { Endpoints } from './api.types';
import type { Endpoints } from './api.types';
const MK_API_ERROR = Symbol();
@ -83,7 +83,7 @@ export class APIClient {
cache: 'no-cache',
}).then(async (res) => {
const body = res.status === 204 ? null : await res.json();
if (res.status === 200) {
resolve(body);
} else if (res.status === 204) {
@ -96,7 +96,7 @@ export class APIClient {
}
}).catch(reject);
});
return promise as any;
}
}