refactor: simplify key further
This commit is contained in:
parent
f1a5108a06
commit
3d5a4e6a90
|
@ -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