From 7961d00e56e9964ee3bfc44e60afb8b69ddaf359 Mon Sep 17 00:00:00 2001 From: Min Idzelis Date: Thu, 2 May 2024 17:12:01 -0400 Subject: [PATCH] fix(web): Configure web's immich sdk to use event.fetch (#9233) * Set event.fetch on @immich/sdk * format --- web/src/routes/+layout.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/src/routes/+layout.ts b/web/src/routes/+layout.ts index ffb36cf352..1751ab236a 100644 --- a/web/src/routes/+layout.ts +++ b/web/src/routes/+layout.ts @@ -1,9 +1,15 @@ +import { defaults } from '@immich/sdk'; import type { LayoutLoad } from './$types'; export const ssr = false; export const csr = true; -export const load = (() => { +export const load = (({ fetch }) => { + // set event.fetch on the fetch-client used by @immich/sdk + // https://kit.svelte.dev/docs/load#making-fetch-requests + // https://github.com/oazapfts/oazapfts/blob/main/README.md#fetch-options + defaults.fetch = fetch; + return { meta: { title: 'Immich',