From 20fafa287adec1382257622fc23bd6f58b09f3a2 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Fri, 19 Jan 2024 00:26:17 -0800
Subject: feat: root prefix all links

---
 src/lib/Tools/Schedule/Tool.svelte | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/lib/Tools/Schedule/Tool.svelte')

diff --git a/src/lib/Tools/Schedule/Tool.svelte b/src/lib/Tools/Schedule/Tool.svelte
index 6b3a6a0c..2fe9a275 100644
--- a/src/lib/Tools/Schedule/Tool.svelte
+++ b/src/lib/Tools/Schedule/Tool.svelte
@@ -13,6 +13,7 @@
 	import './container.css';
 	import Days from './Days.svelte';
 	import settings from '$stores/settings';
+	import root from '$lib/Utility/root';
 
 	let subsPleasePromise: Promise<SubsPlease>;
 	let scheduledMediaPromise: Promise<Partial<Media[]>>;
@@ -26,7 +27,7 @@
 	let forceListMode = parseOrDefault(urlParameters, 'list', false);
 
 	onMount(async () => {
-		subsPleasePromise = fetch(`/api/subsplease?tz=${timeZone}`).then((r) => r.json());
+		subsPleasePromise = fetch(root(`/api/subsplease?tz=${timeZone}`)).then((r) => r.json());
 		scheduledMediaPromise = scheduleMediaListCollection(new Date().getFullYear(), season(), true);
 	});
 </script>
@@ -37,7 +38,7 @@
 	<select
 		bind:value={timeZone}
 		on:change={() =>
-			(subsPleasePromise = fetch(`/api/subsplease?tz=${timeZone}`).then((r) => r.json()))}
+			(subsPleasePromise = fetch(root(`/api/subsplease?tz=${timeZone}`)).then((r) => r.json()))}
 	>
 		{#each Intl.supportedValuesOf('timeZone') as zone}
 			<option value={zone}>
-- 
cgit v1.2.3

