mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 16:25:24 +02:00
Comprehensive audit: Replace backend JWT dependency universally with anon key and strict cache rules
This commit is contained in:
+4
-4
@@ -47,7 +47,7 @@ export async function saveRowToSupabase(articleNo: string, rowData: ExcelRow, to
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'apikey': SUPABASE_KEY,
|
||||
'Authorization': `Bearer ${token || SUPABASE_KEY}`,
|
||||
'Authorization': `Bearer ${SUPABASE_KEY}`,
|
||||
'Prefer': 'resolution=merge-duplicates'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
@@ -100,7 +100,7 @@ export async function saveHistoryEntry(
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'apikey': SUPABASE_KEY,
|
||||
'Authorization': `Bearer ${token || SUPABASE_KEY}`,
|
||||
'Authorization': `Bearer ${SUPABASE_KEY}`,
|
||||
'Prefer': 'return=minimal'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
@@ -178,7 +178,7 @@ export async function deleteHistoryEntry(id: string, token?: string): Promise<bo
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'apikey': SUPABASE_KEY,
|
||||
'Authorization': `Bearer ${token || SUPABASE_KEY}`
|
||||
'Authorization': `Bearer ${SUPABASE_KEY}`
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -199,7 +199,7 @@ export async function resetAllPendingRows(token?: string): Promise<boolean> {
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'apikey': SUPABASE_KEY,
|
||||
'Authorization': `Bearer ${token || SUPABASE_KEY}`,
|
||||
'Authorization': `Bearer ${SUPABASE_KEY}`,
|
||||
'Prefer': 'return=minimal'
|
||||
},
|
||||
body: JSON.stringify({ status: 'synced' })
|
||||
|
||||
Reference in New Issue
Block a user