feat: allow setting default server via env (#854)
This commit is contained in:
parent
697a88ac3d
commit
57fd9aeae2
6 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import Fuse from 'fuse.js'
|
||||
import { $fetch } from 'ofetch'
|
||||
import { DEFAULT_SERVER } from '~/constants'
|
||||
|
||||
const input = $ref<HTMLInputElement>()
|
||||
let server = $ref<string>('')
|
||||
|
@ -26,7 +25,7 @@ async function oauth() {
|
|||
server = server.split('/')[0]
|
||||
|
||||
try {
|
||||
location.href = await $fetch<string>(`/api/${server || DEFAULT_SERVER}/login`, {
|
||||
location.href = await $fetch<string>(`/api/${server || publicServer.value}/login`, {
|
||||
method: 'POST',
|
||||
body: {
|
||||
origin: location.origin,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue