From 469074d75b14a27187051d47941ba63cd2235d81 Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Thu, 29 Dec 2022 23:39:56 +0100 Subject: [PATCH] Consistent build api url & updated base to /api/v1 --- src/lib/utils/requestSessionCookie.ts | 8 ++------ src/routes/Footer.svelte | 7 ++----- src/routes/login/+page.svelte | 7 ++----- src/routes/sitemap.xml/+server.ts | 2 +- src/routes/styles.css | 2 -- src/routes/warehouse/+page.server.ts | 2 +- 6 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/lib/utils/requestSessionCookie.ts b/src/lib/utils/requestSessionCookie.ts index a7b6181..7802b63 100644 --- a/src/lib/utils/requestSessionCookie.ts +++ b/src/lib/utils/requestSessionCookie.ts @@ -1,11 +1,7 @@ -import { dev } from '$app/environment'; +import { buildApiUrl } from './apiUrl'; export default async function requestSessionCookie() { - let url = '/api'; - if (dev) { - url = 'http://localhost:30010'.concat(url); - } - + const url = buildApiUrl('/api/v1'); await fetch(url); return true; } diff --git a/src/routes/Footer.svelte b/src/routes/Footer.svelte index f467ed2..1b3290f 100644 --- a/src/routes/Footer.svelte +++ b/src/routes/Footer.svelte @@ -1,14 +1,11 @@