Method
update
(@Body() body, @Param('id') id: string)
Source from the content-addressed store, hash-verified
| 93 | }, |
| 94 | }) |
| 95 | async update(@Body() body, @Param('id') id: string) { |
| 96 | try { |
| 97 | await this.userServices.update(id, body); |
| 98 | return new ServerResponse(201, 'Successfully updated user'); |
| 99 | } catch (err: any) { |
| 100 | this.logger.error(`Failed to update user: ${err}`); |
| 101 | throw new HttpException(err?.code ?? err?.name ?? `${err}`, 400); |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | @Put('') |
| 106 | @UseGuards(UserGuard) |
Tested by
no test coverage detected