espero ya no moverle
This commit is contained in:
@@ -22,7 +22,7 @@ import {Role} from '../permissions/role.enum'
|
||||
|
||||
|
||||
@Controller('auth')
|
||||
//@UseGuards(RolesGuard)
|
||||
@UseGuards(RolesGuard)
|
||||
export class AuthController {
|
||||
constructor(private authService: AuthService) {}
|
||||
|
||||
@@ -63,17 +63,17 @@ export class AuthController {
|
||||
}
|
||||
|
||||
//@UseGuards(AuthGuard)
|
||||
@Put('Modificacion/:id')
|
||||
@Put(':id_usuario')
|
||||
@Roles(Role.Admin)
|
||||
async update(@Param('id') userId: number, @Body() data: registerDto) {
|
||||
return this.authService.update(userId, data);
|
||||
async update(@Param('id_usuario') id_usuario: number, @Body() data: registerDto) {
|
||||
return this.authService.update(id_usuario, data);
|
||||
}
|
||||
|
||||
//@UseGuards(AuthGuard)
|
||||
@Delete('Borrado/:id')
|
||||
@Delete(':id_usuario')
|
||||
@Roles(Role.Admin)
|
||||
async remove(@Param('id') id: number) {
|
||||
await this.authService.remove(id);
|
||||
async remove(@Param('id_usuario') id_usuario: number) {
|
||||
await this.authService.remove(id_usuario);
|
||||
return { message: 'User successfully deleted' };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user