fixed update and delate
This commit is contained in:
@@ -37,16 +37,14 @@ export class AuthController {
|
||||
return req.user;
|
||||
}
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
@Put('Modificacion/:id')
|
||||
async update(@Param('id') id: number, @Body() updateUserDto: Record<string, any>) {
|
||||
return this.authService.update(id, updateUserDto);
|
||||
async update(@Param('id') userId: number, @Body() updateUserDto: Record<string, any>) {
|
||||
return this.authService.update(userId, updateUserDto);
|
||||
}
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
@Delete('Borrado/:id')
|
||||
async remove(@Param('id') id: number) {
|
||||
await this.authService.remove(id);
|
||||
@Delete(':id')
|
||||
async remove(@Param('id') userId: number) {
|
||||
await this.authService.remove(userId);
|
||||
return { message: 'User successfully deleted' };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user