fix: filter servers when listing them

pull/610/head
Daniel Roe 2022-12-28 15:03:32 +01:00
rodzic 5c73a6f98e
commit 377072bea7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 22D5008E4F5D9B55
1 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -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())