less logs

This commit is contained in:
boufni95 2023-10-27 20:09:27 +02:00
parent bbbb14baec
commit aeae71baf8
2 changed files with 0 additions and 3 deletions

View file

@ -8,14 +8,12 @@ const handledRequests: string[] = [] // TODO: - big memory leak here, add TTL
export default (serverMethods: Types.ServerMethods, mainHandler: Main, nostrSettings: NostrSettings) => { export default (serverMethods: Types.ServerMethods, mainHandler: Main, nostrSettings: NostrSettings) => {
const nostrTransport = NewNostrTransport(serverMethods, { const nostrTransport = NewNostrTransport(serverMethods, {
NostrUserAuthGuard: async (appId, pub) => { NostrUserAuthGuard: async (appId, pub) => {
console.log({ appId })
const app = await mainHandler.storage.applicationStorage.GetApplication(appId || "") const app = await mainHandler.storage.applicationStorage.GetApplication(appId || "")
let nostrUser = await mainHandler.storage.applicationStorage.GetOrCreateNostrAppUser(app, pub || "") let nostrUser = await mainHandler.storage.applicationStorage.GetOrCreateNostrAppUser(app, pub || "")
return { user_id: nostrUser.user.user_id, app_user_id: nostrUser.identifier, app_id: appId || "" } return { user_id: nostrUser.user.user_id, app_user_id: nostrUser.identifier, app_id: appId || "" }
} }
}) })
const nostr = new Nostr(nostrSettings, event => { const nostr = new Nostr(nostrSettings, event => {
console.log(event)
let j: NostrRequest let j: NostrRequest
try { try {
j = JSON.parse(event.content) j = JSON.parse(event.content)

View file

@ -105,7 +105,6 @@ export default class Handler {
} }
]) ])
sub.on("event", async (e) => { sub.on("event", async (e) => {
console.log({ nostrEvent: e })
if (e.kind !== 4 || !e.pubkey) { if (e.kind !== 4 || !e.pubkey) {
return return
} }