I have this test request using the VS Code REST Client extension:
PATCH http://localhost:3000/auth/3
content-type: application/json
{ "email": "new.email3@gmail.com" }
On the receiving end, the NestJS app listening on this endpoint isn't picking up the body of the PATCH request, so there's no update within the NestJS service responsible for update requests.
Here's the controller method/endpoint in NestJS:
@Patch('/:id')
updateUser(@Param('id') id: string, @Body() body: UpdateUserDto) {
console.log('body: ', body);
return this.usersService.update(parseInt(id), body);
}
And the result of the debugging console log above:
body: {}
Thanks!