fixed bug
This commit is contained in:
@@ -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>) {
|
||||
|
||||
@@ -65,8 +65,6 @@ export class AuthService {
|
||||
return { token: token };
|
||||
}
|
||||
|
||||
async create(data) {}
|
||||
|
||||
async update(id, updateUserDto) {}
|
||||
|
||||
async remove(id) {}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user