fixed create user
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user