Skip to content

Commit

Permalink
fix(web): Configure web's immich sdk to use event.fetch (#9233)
Browse files Browse the repository at this point in the history
* Set event.fetch on @immich/sdk

* format
  • Loading branch information
midzelis committed May 2, 2024
1 parent c125366 commit 7961d00
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion web/src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit 7961d00

Please sign in to comment.