kopia lustrzana https://github.com/elk-zone/elk
refactor: simplify key further
rodzic
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))
|
||||
|
|
Ładowanie…
Reference in New Issue