Add files via upload
This commit is contained in:
parent
0afea8ef67
commit
2e47865dcc
7 changed files with 35 additions and 18 deletions
|
|
@ -23,7 +23,7 @@ export async function clearTokens() {
|
|||
|
||||
export async function apiFetch(path: string, opts: RequestInit = {}): Promise<Response> {
|
||||
const token = await getAccessToken();
|
||||
const headers: HeadersInit = {
|
||||
const headers: Record<string, string> = {
|
||||
'Content-Type': 'application/json',
|
||||
...(token ? { Authorization: `Bearer ${token}` } : {}),
|
||||
...(opts.headers as Record<string, string> || {}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue