Skip to content

Commit

Permalink
fix: use correct api url
Browse files Browse the repository at this point in the history
  • Loading branch information
Draconizations committed Oct 3, 2024
1 parent ce60677 commit 8a747ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ declare global {
// interface Error {}
interface Locals {
api: ApiClient
apiBaseUrl?: string
}
// interface PageData {}
// interface Platform {}
Expand Down
1 change: 1 addition & 0 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const handle: Handle = async ({ event, resolve }) => {
}
const apiBaseUrl = getBaseUrl()
event.locals.api = apiClient(event.fetch, apiBaseUrl)
event.locals.apiBaseUrl = apiBaseUrl

const response = await resolve(event)
return response
Expand Down

0 comments on commit 8a747ee

Please sign in to comment.