forked from Mirrors/elk
refactor: simplify key further
This commit is contained in:
parent
f1a5108a06
commit
3d5a4e6a90
1 changed files with 2 additions and 4 deletions
|
@ -52,10 +52,8 @@ async function fetchAppInfo(server: string) {
|
|||
return app
|
||||
}
|
||||
|
||||
const serverKey = (host: string, server: string) => `servers:${host}:${server}.json`
|
||||
|
||||
export async function getApp(host: string, server: string) {
|
||||
const key = serverKey(host, server)
|
||||
export async function getApp(server: string) {
|
||||
const key = `servers:${HOST_DOMAIN.replace(/[^\w\d]/g, '-')}:${server}.json`
|
||||
|
||||
try {
|
||||
if (await storage.hasItem(key))
|
||||
|
|
Loading…
Reference in a new issue