This commit is contained in:
TioSam77
2024-06-18 16:55:24 -06:00
3 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -65,9 +65,13 @@ export class AuthService {
return { token: token };
}
async update(id, updateUserDto) {}
async update(userId, updateUserDto) {
return await this.userRepository.update(userId, updateUserDto);
}
async remove(id) {}
async remove(userId: number): Promise<void> {
await this.userRepository.delete(userId);
}
//validate tojen of users
async validateToken(token: string): Promise<User> {
+1 -1
View File
@@ -1,4 +1,4 @@
import {IsString, IsNotEmpty,IsNumber,IsEmail } from "class-validator";
import {IsString, IsNotEmpty,IsNumber } from "class-validator";
export class registerDto{
+1 -1
View File
@@ -13,7 +13,7 @@ export class UserDto{
@IsNotEmpty()
id_tipo_usuario:number;
@IsEmail()
@IsString()
@IsNotEmpty()
correo: string;