fix: filter servers when listing them

zio/stable
Daniel Roe 2022-12-28 15:03:32 +01:00
parent 5c73a6f98e
commit 377072bea7
No known key found for this signature in database
GPG Key ID: 22D5008E4F5D9B55
1 changed files with 1 additions and 3 deletions

View File

@ -66,11 +66,9 @@ export async function getApp(server: string) {
}
export async function listServers() {
const keys = await storage.getKeys()
const keys = await storage.getKeys('servers:')
const servers = new Set<string>()
for await (const key of keys) {
if (!key.startsWith('servers:'))
continue
const id = key.split(':').pop()!.replace(/\.json$/, '')
if (id)
servers.add(id.toLocaleLowerCase())