You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c69ad0e
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -511,13 +512,13 @@ export class AuthController implements OnModuleInit {
511
512
@ApiHeader({
512
513
name: 'X-User-Email',
513
514
description: 'Email of an admin or superadmin user',
514
-
required: true,
515
+
required: false,
515
516
schema: {type: 'string'},
516
517
})
517
518
@ApiHeader({
518
519
name: 'X-User-Password',
519
520
description: 'Password of the admin or superadmin user',
520
-
required: true,
521
+
required: false,
521
522
schema: {type: 'string'},
522
523
})
523
524
@ApiBearerAuth('API_Key')
@@ -561,13 +562,13 @@ export class AuthController implements OnModuleInit {
561
562
@ApiHeader({
562
563
name: 'X-User-Email',
563
564
description: 'Email of an admin or superadmin user',
564
-
required: true,
565
+
required: false,
565
566
schema: {type: 'string'},
566
567
})
567
568
@ApiHeader({
568
569
name: 'X-User-Password',
569
570
description: 'Password of the admin or superadmin user',
570
-
required: true,
571
+
required: false,
571
572
schema: {type: 'string'},
572
573
})
573
574
@ApiBearerAuth('API_Key')
@@ -587,4 +588,59 @@ export class AuthController implements OnModuleInit {
587
588
);
588
589
returnnewNewAccountRequestResponse(removed);
589
590
}
591
+
592
+
@Post('/account-request/:id/accept')
593
+
@ApiOperation({
594
+
summary: 'Accept an account request',
595
+
description:
596
+
'Accepts a pending account request: creates the user, optionally creates/links a project (for ADMIN requests with a projectName), and deletes the pending request. Requires admin or superadmin credentials.',
597
+
})
598
+
@ApiParam({
599
+
name: 'id',
600
+
required: true,
601
+
description: 'ID of the account request to accept',
602
+
type: String,
603
+
})
604
+
@ApiResponse({
605
+
status: HttpStatus.CREATED,
606
+
description: 'Account request accepted and user created',
607
+
type: AcceptAccountRequestResponseModel,
608
+
})
609
+
@ApiResponse({
610
+
status: HttpStatus.NOT_FOUND,
611
+
description: 'Account request not found',
612
+
})
613
+
@ApiResponse({
614
+
status: HttpStatus.UNAUTHORIZED,
615
+
description: 'Unauthorized',
616
+
})
617
+
@ApiHeader({
618
+
name: 'X-User-Email',
619
+
description: 'Email of an admin or superadmin user',
620
+
required: false,
621
+
schema: {type: 'string'},
622
+
})
623
+
@ApiHeader({
624
+
name: 'X-User-Password',
625
+
description: 'Password of the admin or superadmin user',
0 commit comments