fix eslint warnings

This commit is contained in:
ennmichael
2023-02-07 20:47:57 +01:00
committed by Kieran
parent 61e6876c6d
commit 441983b8ae
89 changed files with 1018 additions and 588 deletions

View File

@ -107,11 +107,11 @@ export class ServiceProvider {
async _GetJson<T>(
path: string,
method?: "GET" | string,
body?: any,
headers?: any
body?: { [key: string]: string },
headers?: { [key: string]: string }
): Promise<T | ServiceError> {
try {
let rsp = await fetch(`${this.url}${path}`, {
const rsp = await fetch(`${this.url}${path}`, {
method: method,
body: body ? JSON.stringify(body) : undefined,
headers: {
@ -121,7 +121,7 @@ export class ServiceProvider {
},
});
let obj = await rsp.json();
const obj = await rsp.json();
if ("error" in obj) {
return <ServiceError>obj;
}