fixed create user

This commit is contained in:
2026-01-13 14:51:59 -06:00
parent aa84960ae3
commit 20f6e89e82
6 changed files with 20 additions and 11 deletions
+9 -1
View File
@@ -88,7 +88,9 @@ export class UserService {
throw new NotFoundException('Perfil not found');
}
const datauser = { ...rest, perfil };
const fecha_registro = new Date()
const datauser = { ...rest, perfil ,fecha_registro};
const usercreate = this.userRepository.create(datauser);
return this.userRepository.save(usercreate);
@@ -103,5 +105,11 @@ export class UserService {
user.password = data.newPassword;
return this.userRepository.save(user);
}
async getAll(){
return this.userRepository.find();
}
async getAllPerfil(){
return this.perfilRepository.find();
}
}
//IO