From 8c2aed05906f58521dc15a9f8ecadbb31e3c1c7b Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 12 Jan 2023 22:27:14 +0000 Subject: [PATCH] fix: use `globalThis.$fetch` for tauri support --- components/user/UserSignIn.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/user/UserSignIn.vue b/components/user/UserSignIn.vue index 65669a592..66350ce18 100644 --- a/components/user/UserSignIn.vue +++ b/components/user/UserSignIn.vue @@ -25,7 +25,7 @@ async function oauth() { server = server.split('/')[0] try { - location.href = await $fetch(`/api/${server || publicServer.value}/login`, { + location.href = await globalThis.$fetch(`/api/${server || publicServer.value}/login`, { method: 'POST', body: { origin: location.origin, @@ -119,7 +119,7 @@ function select(index: number) { onMounted(async () => { input?.focus() - knownServers = await $fetch('/api/list-servers') + knownServers = await globalThis.$fetch('/api/list-servers') fuse = new Fuse(knownServers, { shouldSort: true }) })