From eaa9e1c847baca66a5c9c05db5f7348deb464983 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sat, 20 Sep 2025 02:46:13 -0700 Subject: [PATCH] Fix database pages and images - Update DatabaseProvider to use SearchAdapter instead of direct fetch - Fix RequestCache error by using cacheTTL instead of cache - Update image cells to use shared image utilities with correct parameters - Use only camelCase field names (granblueId) from transformed responses --- src/lib/api/adapters/search.adapter.ts | 8 +-- .../database/cells/CharacterImageCell.svelte | 4 +- .../database/cells/SummonImageCell.svelte | 4 +- .../database/cells/WeaponImageCell.svelte | 4 +- src/lib/providers/DatabaseProvider.ts | 59 +++++++++---------- 5 files changed, 38 insertions(+), 41 deletions(-) diff --git a/src/lib/api/adapters/search.adapter.ts b/src/lib/api/adapters/search.adapter.ts index 133c2205..c13fbea9 100644 --- a/src/lib/api/adapters/search.adapter.ts +++ b/src/lib/api/adapters/search.adapter.ts @@ -212,7 +212,7 @@ export class SearchAdapter extends BaseAdapter { body: JSON.stringify(body), credentials: 'omit', // Cache search results for 5 minutes by default - cache: params.query ? 300000 : 0 // Don't cache empty searches + cacheTTL: params.query ? 300000 : 0 // Don't cache empty searches }) } @@ -234,7 +234,7 @@ export class SearchAdapter extends BaseAdapter { method: 'POST', body: JSON.stringify(body), credentials: 'omit', - cache: params.query ? 300000 : 0 + cacheTTL: params.query ? 300000 : 0 }) } @@ -256,7 +256,7 @@ export class SearchAdapter extends BaseAdapter { method: 'POST', body: JSON.stringify(body), credentials: 'omit', - cache: params.query ? 300000 : 0 + cacheTTL: params.query ? 300000 : 0 }) } @@ -277,7 +277,7 @@ export class SearchAdapter extends BaseAdapter { method: 'POST', body: JSON.stringify(body), credentials: 'omit', - cache: params.query ? 300000 : 0 + cacheTTL: params.query ? 300000 : 0 }) } diff --git a/src/lib/components/database/cells/CharacterImageCell.svelte b/src/lib/components/database/cells/CharacterImageCell.svelte index 3d6af61d..f1e3d543 100644 --- a/src/lib/components/database/cells/CharacterImageCell.svelte +++ b/src/lib/components/database/cells/CharacterImageCell.svelte @@ -2,7 +2,7 @@
- +