style: format with prettier

This commit is contained in:
Sam 2022-11-25 02:27:46 +01:00
parent ba24815320
commit f2306b8b1d
3 changed files with 54 additions and 32 deletions

View file

@ -124,7 +124,7 @@ export async function fetchAPI<T>(
const resp = await fetch(`${apiBase}/v1${path}`, {
method,
headers: {
...token ? { Authorization: token } : {},
...(token ? { Authorization: token } : {}),
"Content-Type": "application/json",
},
body: body ? JSON.stringify(body) : null,
@ -133,4 +133,4 @@ export async function fetchAPI<T>(
const data = await resp.json();
if (resp.status < 200 || resp.status >= 300) throw data as APIError;
return data as T;
}
}