aboutsummaryrefslogtreecommitdiffstats
path: root/web/composables/fetch-schedule.ts
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2025-08-15 19:20:48 +0100
committerLeonardo Bishop <me@leonardobishop.com>2025-08-15 19:20:48 +0100
commit8f7dec8ba6b2f9bde01afd0a110596ebbd43e0ed (patch)
tree7b4f203d92f4b99b1e98fac314415e293984196b /web/composables/fetch-schedule.ts
parent4697556cac819c47d068819b9fc9c3b4ea84e279 (diff)
Implement OIDC
Diffstat (limited to 'web/composables/fetch-schedule.ts')
-rw-r--r--web/composables/fetch-schedule.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/web/composables/fetch-schedule.ts b/web/composables/fetch-schedule.ts
index c061d92..a0e6fec 100644
--- a/web/composables/fetch-schedule.ts
+++ b/web/composables/fetch-schedule.ts
@@ -1,4 +1,4 @@
-export default function useFetchFavourites() {
+export default function() {
const scheduleStore = useScheduleStore();
const errorStore = useErrorStore();
const config = useRuntimeConfig();
@@ -10,7 +10,7 @@ export default function useFetchFavourites() {
onResponse: ({ response }) => {
if (!response.ok) {
if (response.status === 401) {
- navigateTo({ name: 'login', state: { error: 'Sorry, your session has expired' } });
+ navigateTo({ path: '/login', state: { error: 'Sorry, your session has expired' } });
} else {
errorStore.setError(response._data.message || 'An unknown error occurred');
}
@@ -18,9 +18,6 @@ export default function useFetchFavourites() {
if (response._data) {
scheduleStore.setSchedule((response._data as any).data.schedule);
- errorStore.setError("Schedule set");
- } else {
- errorStore.setError("Invalid response returned by server");
}
},
});