From cec41d9cbb4e204830b259c5626848af8bbdadc4 Mon Sep 17 00:00:00 2001 From: b1ek Date: Mon, 11 Nov 2024 20:52:00 +1000 Subject: [PATCH] disable cache --- front/src/api/DataRow.ts | 3 ++- front/src/api/DataRowSelection.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/front/src/api/DataRow.ts b/front/src/api/DataRow.ts index b834443..c8d7c75 100644 --- a/front/src/api/DataRow.ts +++ b/front/src/api/DataRow.ts @@ -18,7 +18,8 @@ export class DataRow { static async find(options?: DataRowSearchOptions): Promise { const req = await ky('/api/data/list', { - searchParams: options + searchParams: options, + cache: 'no-cache' }); const raw = await req.json(); diff --git a/front/src/api/DataRowSelection.ts b/front/src/api/DataRowSelection.ts index a0769f6..da35d01 100644 --- a/front/src/api/DataRowSelection.ts +++ b/front/src/api/DataRowSelection.ts @@ -20,7 +20,7 @@ export class DataRowSelection { } async get(): Promise { - const req = await ky('/api/selection', { method: 'GET' }); + const req = await ky('/api/selection', { method: 'GET', cache: 'no-cache' }); const data = await req.json(); if (!(data instanceof Array)) throw new Array('API returned invalid data'); return data.map(DataRow.reviveJSON)