fix: filter servers when listing them
parent
5c73a6f98e
commit
377072bea7
|
@ -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 New Issue