From c2e56f1c2e84d72464c667bd02bed4b33cb643d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?= <31509435+aleksasiriski@users.noreply.github.com> Date: Fri, 10 Nov 2023 17:48:44 +0100 Subject: [PATCH] fix: remove double api call (on ssr and csr) --- src/routes/healthz/api/private/+page.server.ts | 2 +- src/routes/healthz/api/public/+page.ts | 2 +- src/routes/search/+page.svelte | 2 +- src/routes/search/+page.ts | 18 +++++++++++++----- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/routes/healthz/api/private/+page.server.ts b/src/routes/healthz/api/private/+page.server.ts index ce8f10b6..56bc7ec8 100644 --- a/src/routes/healthz/api/private/+page.server.ts +++ b/src/routes/healthz/api/private/+page.server.ts @@ -1,7 +1,7 @@ export const csr = false; -import type { PageServerLoad } from './$types'; import { env } from '$env/dynamic/private'; +import type { PageServerLoad } from './$types'; export const load: PageServerLoad = async ({ fetch }) => { const apiUrl = `${env.API_URL}/healthz`; diff --git a/src/routes/healthz/api/public/+page.ts b/src/routes/healthz/api/public/+page.ts index da012dff..b67d44bc 100644 --- a/src/routes/healthz/api/public/+page.ts +++ b/src/routes/healthz/api/public/+page.ts @@ -1,7 +1,7 @@ export const ssr = false; -import type { PageLoad } from './$types'; import { env } from '$env/dynamic/public'; +import type { PageLoad } from './$types'; export const load: PageLoad = async ({ fetch }) => { const apiUrl = `${env.PUBLIC_API_URL}/healthz`; diff --git a/src/routes/search/+page.svelte b/src/routes/search/+page.svelte index e3af59ea..6c455f65 100644 --- a/src/routes/search/+page.svelte +++ b/src/routes/search/+page.svelte @@ -24,7 +24,7 @@