migrations and logs
This commit is contained in:
parent
db08370d5c
commit
03f803c4f4
11 changed files with 2353 additions and 2121 deletions
|
|
@ -187,6 +187,17 @@ export default (methods: Types.ServerMethods, opts: NostrOptions) => {
|
|||
})
|
||||
}catch(ex){ const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger); if (opts.throwErrors) throw e }
|
||||
break
|
||||
case 'GetMigrationUpdate':
|
||||
try {
|
||||
if (!methods.GetMigrationUpdate) throw new Error('method: GetMigrationUpdate is not implemented')
|
||||
const authContext = await opts.NostrUserAuthGuard(req.appId, req.authIdentifier)
|
||||
const query = req.query
|
||||
const params = req.params
|
||||
methods.GetMigrationUpdate({ ...authContext, ...query, ...params }, (response, err) => {
|
||||
if (err) { logErrorAndReturnResponse(err, err.message, res, logger)} else { res({status: 'OK', ...response})}
|
||||
})
|
||||
}catch(ex){ const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger); if (opts.throwErrors) throw e }
|
||||
break
|
||||
default: logger.error('unknown rpc call name from nostr event:'+req.rpcName)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue