1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-23 14:46:08 +09:00

refactor: simplify key further

This commit is contained in:
Daniel Roe 2022-11-27 18:33:19 +00:00
parent f1a5108a06
commit 3d5a4e6a90
No known key found for this signature in database
GPG Key ID: 22D5008E4F5D9B55

View File

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