feat: add delete oauth app for admin

This commit is contained in:
三咲智子 Kevin Deng 2023-01-15 17:34:17 +08:00
parent 2e7979817a
commit ba5b89d5b8
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
4 changed files with 22 additions and 0 deletions

View file

@ -63,6 +63,12 @@ export async function getApp(origin: string, server: string) {
}
}
export async function deleteApp(server: string) {
const keys = (await storage.getKeys('servers:')).filter(k => k.endsWith(`${server}.json`))
for (const key of keys)
await storage.removeItem(key)
}
export async function listServers() {
const keys = await storage.getKeys('servers:')
const servers = new Set<string>()