From 6b5a29db70e604e7cac8a36f30f0323e67641665 Mon Sep 17 00:00:00 2001 From: "Justin (shocknet)" <34176400+shocknet-justin@users.noreply.github.com> Date: Wed, 14 Aug 2024 13:34:08 -0400 Subject: [PATCH] Update nostrMiddleware.ts --- src/nostrMiddleware.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nostrMiddleware.ts b/src/nostrMiddleware.ts index 522d2ca6..5bb1b1ec 100644 --- a/src/nostrMiddleware.ts +++ b/src/nostrMiddleware.ts @@ -23,7 +23,7 @@ export default (serverMethods: Types.ServerMethods, mainHandler: Main, nostrSett NostrMetricsAuthGuard: async (appId, pub) => { const adminNpub = mainHandler.adminManager.GetAdminNpub() if (!adminNpub) { throw new Error("admin access not configured") } - if (pub !== adminNpub) { throw new Error("admin access denied") } + if (pub !== adminNpub) { throw new Error("Metrics unavailable") } log("operator access from", pub) return { operator_id: pub } }, @@ -58,4 +58,4 @@ export default (serverMethods: Types.ServerMethods, mainHandler: Main, nostrSett }, event.startAtNano, event.startAtMs) }) return { Stop: () => nostr.Stop, Send: (...args) => nostr.Send(...args) } -} \ No newline at end of file +}