Add files via upload

This commit is contained in:
Savsis 2026-05-07 00:33:55 +05:00 • committed by GitHub
parent 0afea8ef67
commit 2e47865dcc
7 changed files with 35 additions and 18 deletions

View file

@ -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> || {}),