Method
update
(
@CurrentAuth() auth: AuthContext,
@Param('id') id: string,
@Body(new ZodValidationPipe(UpdateApiKeySchema)) dto: UpdateApiKeyDto,
)
Source from the content-addressed store, hash-verified
| 72 | @Roles('ADMIN') |
| 73 | @ApiOkResponse({ type: ApiKeyResponseDto }) |
| 74 | async update( |
| 75 | @CurrentAuth() auth: AuthContext, |
| 76 | @Param('id') id: string, |
| 77 | @Body(new ZodValidationPipe(UpdateApiKeySchema)) dto: UpdateApiKeyDto, |
| 78 | ) { |
| 79 | const apiKey = await this.apiKeysService.update(auth, id, dto); |
| 80 | return ApiKeyResponseDto.create(apiKey); |
| 81 | } |
| 82 | |
| 83 | @Post(':id/revoke') |
| 84 | @Roles('ADMIN') |
Tested by
no test coverage detected