mirror of
https://github.com/elk-zone/elk.git
synced 2024-12-18 09:01:46 +03:00
fix: filter servers when listing them
This commit is contained in:
parent
5c73a6f98e
commit
377072bea7
1 changed files with 1 additions and 3 deletions
|
@ -66,11 +66,9 @@ export async function getApp(server: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function listServers() {
|
export async function listServers() {
|
||||||
const keys = await storage.getKeys()
|
const keys = await storage.getKeys('servers:')
|
||||||
const servers = new Set<string>()
|
const servers = new Set<string>()
|
||||||
for await (const key of keys) {
|
for await (const key of keys) {
|
||||||
if (!key.startsWith('servers:'))
|
|
||||||
continue
|
|
||||||
const id = key.split(':').pop()!.replace(/\.json$/, '')
|
const id = key.split(':').pop()!.replace(/\.json$/, '')
|
||||||
if (id)
|
if (id)
|
||||||
servers.add(id.toLocaleLowerCase())
|
servers.add(id.toLocaleLowerCase())
|
||||||
|
|
Loading…
Reference in a new issue