|
|
|
@ -6,6 +6,7 @@ import { |
|
|
|
HttpCode, |
|
|
|
HttpStatus, |
|
|
|
Param, |
|
|
|
Patch, |
|
|
|
Post, |
|
|
|
Request, |
|
|
|
UseGuards, |
|
|
|
@ -95,6 +96,16 @@ export class AuthController { |
|
|
|
return { message: 'API Key Revoked' } |
|
|
|
} |
|
|
|
|
|
|
|
@UseGuards(AuthGuard, CanModifyApiKey) |
|
|
|
@ApiOperation({ summary: 'Rename Api Key' }) |
|
|
|
@ApiBearerAuth() |
|
|
|
@HttpCode(HttpStatus.OK) |
|
|
|
@Patch('/api-keys/:id/rename') |
|
|
|
async renameApiKey(@Param() params, @Body() input: { name: string }) { |
|
|
|
await this.authService.renameApiKey(params.id, input.name) |
|
|
|
return { message: 'API Key Renamed' } |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation({ summary: 'Request Password Reset' }) |
|
|
|
@HttpCode(HttpStatus.OK) |
|
|
|
@Post('/request-password-reset') |
|
|
|
|