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 f47801f
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -326,13 +327,13 @@ export class AuthController implements OnModuleInit {
326
327
@ApiHeader({
327
328
name: 'X-User-Email',
328
329
description: 'Email of an admin or superadmin user',
329
-
required: true,
330
+
required: false,
330
331
schema: {type: 'string'},
331
332
})
332
333
@ApiHeader({
333
334
name: 'X-User-Password',
334
335
description: 'Password of the admin or superadmin user',
335
-
required: true,
336
+
required: false,
336
337
schema: {type: 'string'},
337
338
})
338
339
@ApiBearerAuth('API_Key')
@@ -376,13 +377,13 @@ export class AuthController implements OnModuleInit {
376
377
@ApiHeader({
377
378
name: 'X-User-Email',
378
379
description: 'Email of an admin or superadmin user',
379
-
required: true,
380
+
required: false,
380
381
schema: {type: 'string'},
381
382
})
382
383
@ApiHeader({
383
384
name: 'X-User-Password',
384
385
description: 'Password of the admin or superadmin user',
385
-
required: true,
386
+
required: false,
386
387
schema: {type: 'string'},
387
388
})
388
389
@ApiBearerAuth('API_Key')
@@ -402,4 +403,59 @@ export class AuthController implements OnModuleInit {
402
403
);
403
404
returnnewNewAccountRequestResponse(removed);
404
405
}
406
+
407
+
@Post('/account-request/:id/accept')
408
+
@ApiOperation({
409
+
summary: 'Accept an account request',
410
+
description:
411
+
'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.',
412
+
})
413
+
@ApiParam({
414
+
name: 'id',
415
+
required: true,
416
+
description: 'ID of the account request to accept',
417
+
type: String,
418
+
})
419
+
@ApiResponse({
420
+
status: HttpStatus.CREATED,
421
+
description: 'Account request accepted and user created',
422
+
type: AcceptAccountRequestResponseModel,
423
+
})
424
+
@ApiResponse({
425
+
status: HttpStatus.NOT_FOUND,
426
+
description: 'Account request not found',
427
+
})
428
+
@ApiResponse({
429
+
status: HttpStatus.UNAUTHORIZED,
430
+
description: 'Unauthorized',
431
+
})
432
+
@ApiHeader({
433
+
name: 'X-User-Email',
434
+
description: 'Email of an admin or superadmin user',
435
+
required: false,
436
+
schema: {type: 'string'},
437
+
})
438
+
@ApiHeader({
439
+
name: 'X-User-Password',
440
+
description: 'Password of the admin or superadmin user',
0 commit comments