style: format with prettier
This commit is contained in:
parent
ba24815320
commit
f2306b8b1d
3 changed files with 54 additions and 32 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue