complete req after auth
This commit is contained in:
parent
de28b5ce3c
commit
33ad95c9bd
1 changed files with 5 additions and 0 deletions
|
|
@ -30,6 +30,11 @@ export class ManagementManager {
|
||||||
|
|
||||||
AuthorizeManage = async (ctx: Types.UserContext, req: Types.ManageAuthorizationRequest): Promise<Types.ManageAuthorization> => {
|
AuthorizeManage = async (ctx: Types.UserContext, req: Types.ManageAuthorizationRequest): Promise<Types.ManageAuthorization> => {
|
||||||
const grant = await this.storage.managementStorage.addGrant(ctx.app_user_id, req.authorize_npub, req.ban)
|
const grant = await this.storage.managementStorage.addGrant(ctx.app_user_id, req.authorize_npub, req.ban)
|
||||||
|
const awaiting = this.awaitingRequests[req.authorize_npub]
|
||||||
|
if (awaiting) {
|
||||||
|
delete this.awaitingRequests[req.authorize_npub]
|
||||||
|
await this.handleRequest(awaiting.request, awaiting.event)
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
manage_id: grant.serial_id.toString(),
|
manage_id: grant.serial_id.toString(),
|
||||||
authorized: !grant.banned,
|
authorized: !grant.banned,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue