fixed bug

This commit is contained in:
2024-06-18 16:38:34 -06:00
parent 6945846ef5
commit 30048aa544
6 changed files with 16 additions and 16 deletions
+1 -6
View File
@@ -26,6 +26,7 @@ export class AuthController {
return this.authService.signIn(data);
}
@UseGuards(AuthGuard)
@Post("register")
async register(@Body() data: registerDto){
return this.authService.register(data)
@@ -37,12 +38,6 @@ export class AuthController {
return req.user;
}
@UseGuards(AuthGuard)
@Post('Alta')
async create(@Body() data: UserDto) {
return this.authService.create(data);
}
@UseGuards(AuthGuard)
@Put('Modificacion/:id')
async update(@Param('id') id: number, @Body() updateUserDto: Record<string, any>) {
-2
View File
@@ -65,8 +65,6 @@ export class AuthService {
return { token: token };
}
async create(data) {}
async update(id, updateUserDto) {}
async remove(id) {}
+2 -2
View File
@@ -1,4 +1,4 @@
import {IsString, IsNotEmpty,IsNumber } from "class-validator";
import {IsString, IsNotEmpty,IsNumber,IsEmail } from "class-validator";
export class registerDto{
@@ -14,7 +14,7 @@ export class registerDto{
@IsNotEmpty()
id_tipo_usuario:number;
@IsString()
@IsEmail()
@IsNotEmpty()
correo: string;