Update nostrMiddleware.ts
This commit is contained in:
parent
a46f805764
commit
6b5a29db70
1 changed files with 2 additions and 2 deletions
|
|
@ -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) }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue