feat: allow setting default server via env (#854)

This commit is contained in:
Daniel Roe 2023-01-07 13:38:31 -08:00 committed by GitHub
parent 697a88ac3d
commit 57fd9aeae2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 5 deletions

View file

@ -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,