mirror of
https://github.com/elk-zone/elk
synced 2024-11-23 14:46:08 +09:00
fix: normalize server name
This commit is contained in:
parent
fdf2d75d86
commit
32f22f81d9
@ -110,7 +110,7 @@ onMounted(async () => {
|
||||
<div
|
||||
absolute left-6em right-0 top="100%"
|
||||
bg-base rounded border="~ base"
|
||||
text-left
|
||||
text-left z-10 shadow
|
||||
>
|
||||
<div
|
||||
v-for="server, idx in filteredServers"
|
||||
|
@ -3,7 +3,8 @@ import { createError, defineEventHandler, getRouterParams } from 'h3'
|
||||
import { getApp, getRedirectURI } from '~/server/shared'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { server } = getRouterParams(event)
|
||||
let { server } = getRouterParams(event)
|
||||
server = server.toLocaleLowerCase().trim()
|
||||
const app = await getApp(server)
|
||||
|
||||
if (!app) {
|
||||
|
@ -3,7 +3,8 @@ import { createError, defineEventHandler, getQuery, getRouterParams, sendRedirec
|
||||
import { getApp, getRedirectURI } from '~/server/shared'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { server } = getRouterParams(event)
|
||||
let { server } = getRouterParams(event)
|
||||
server = server.toLocaleLowerCase().trim()
|
||||
const app = await getApp(server)
|
||||
|
||||
if (!app) {
|
||||
|
@ -73,7 +73,7 @@ export async function listServers() {
|
||||
continue
|
||||
const id = key.split(':').pop()!.replace(/\.json$/, '')
|
||||
if (id)
|
||||
servers.add(id)
|
||||
servers.add(id.toLocaleLowerCase())
|
||||
}
|
||||
return Array.from(servers).sort()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user