mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 18:55:24 +02:00
Disable fetch cache to sync history across computers
This commit is contained in:
@@ -13,6 +13,7 @@ export async function getAllSyncedRows(token?: string): Promise<Record<string, S
|
|||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`${SUPABASE_URL}/rest/v1/products?select=product_id,data,status&order=updated_at.desc`,
|
`${SUPABASE_URL}/rest/v1/products?select=product_id,data,status&order=updated_at.desc`,
|
||||||
{
|
{
|
||||||
|
cache: 'no-store',
|
||||||
headers: {
|
headers: {
|
||||||
'apikey': SUPABASE_KEY,
|
'apikey': SUPABASE_KEY,
|
||||||
'Authorization': `Bearer ${token || SUPABASE_KEY}`
|
'Authorization': `Bearer ${token || SUPABASE_KEY}`
|
||||||
@@ -129,6 +130,7 @@ export async function getHistory(token?: string): Promise<HistoryEntry[]> {
|
|||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`${SUPABASE_URL}/rest/v1/products_history?select=*&order=changed_at.desc&limit=100`,
|
`${SUPABASE_URL}/rest/v1/products_history?select=*&order=changed_at.desc&limit=100`,
|
||||||
{
|
{
|
||||||
|
cache: 'no-store',
|
||||||
headers: {
|
headers: {
|
||||||
'apikey': SUPABASE_KEY,
|
'apikey': SUPABASE_KEY,
|
||||||
'Authorization': `Bearer ${token || SUPABASE_KEY}`
|
'Authorization': `Bearer ${token || SUPABASE_KEY}`
|
||||||
|
|||||||
Reference in New Issue
Block a user