From 2137e76e9dfcc13a2fcb1753844762cc4b99582a Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Fri, 13 Feb 2026 18:35:13 +0000 Subject: Add auth headers to file upload/delete requests The frontend upload and delete file fetch calls were missing auth headers, so the backend could not resolve user-specific API keys. Co-Authored-By: Claude Opus 4.6 --- frontend/src/store/flowStore.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'frontend/src/store/flowStore.ts') diff --git a/frontend/src/store/flowStore.ts b/frontend/src/store/flowStore.ts index 6140339..3dac19f 100644 --- a/frontend/src/store/flowStore.ts +++ b/frontend/src/store/flowStore.ts @@ -1790,6 +1790,7 @@ const useFlowStore = create((set, get) => { try { const res = await fetch(`${API_BASE}/api/files/upload?user=${encodeURIComponent(getCurrentUser())}`, { method: 'POST', + headers: { ...getAuthHeaders() }, body: form, }); if (!res.ok) { @@ -1809,6 +1810,7 @@ const useFlowStore = create((set, get) => { deleteFile: async (fileId: string) => { const res = await fetch(`${API_BASE}/api/files/delete?user=${encodeURIComponent(getCurrentUser())}&file_id=${encodeURIComponent(fileId)}`, { method: 'POST', + headers: { ...getAuthHeaders() }, }); if (!res.ok) { throw new Error(await res.text()); -- cgit v1.2.3