mirror of
https://github.com/elk-zone/elk.git
synced 2024-09-06 12:19:08 +01:00
fix: use globalThis.$fetch
for tauri support
This commit is contained in:
parent
27d1328c13
commit
8c2aed0590
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ async function oauth() {
|
||||||
server = server.split('/')[0]
|
server = server.split('/')[0]
|
||||||
|
|
||||||
try {
|
try {
|
||||||
location.href = await $fetch<string>(`/api/${server || publicServer.value}/login`, {
|
location.href = await globalThis.$fetch(`/api/${server || publicServer.value}/login`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: {
|
body: {
|
||||||
origin: location.origin,
|
origin: location.origin,
|
||||||
|
@ -119,7 +119,7 @@ function select(index: number) {
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
input?.focus()
|
input?.focus()
|
||||||
knownServers = await $fetch('/api/list-servers')
|
knownServers = await globalThis.$fetch('/api/list-servers')
|
||||||
fuse = new Fuse(knownServers, { shouldSort: true })
|
fuse = new Fuse(knownServers, { shouldSort: true })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue