MCPcopy Create free account
hub / github.com/SOS-RS/backend / selfUpdate

Method selfUpdate

src/users/users.controller.ts:137–146  ·  view source on GitHub ↗
(@Body() body, @Req() req)

Source from the content-addressed store, hash-verified

135 },
136 })
137 async selfUpdate(@Body() body, @Req() req) {
138 try {
139 const { userId } = req.user;
140 await this.userServices.update(userId, body);
141 return new ServerResponse(201, 'Successfully updated');
142 } catch (err: any) {
143 this.logger.error(`Failed to update user: ${err}`);
144 throw new HttpException(err?.code ?? err?.name ?? `${err}`, 400);
145 }
146 }
147
148 @Get('find/:field/:value')
149 async find(@Param('field') field: string, @Param('value') value: string) {

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected