Skip to content

Commit

Permalink
fix: user create
Browse files Browse the repository at this point in the history
  • Loading branch information
mikayel00 committed Apr 8, 2024
1 parent 3a013d7 commit f426b98
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ export class UsersService {
constructor(@InjectRepository(User) private readonly usersRepository: Repository<User>) {}

create(createUserDto: UsersDTO): Promise<User> {
const user = new User();

user.name = createUserDto.name;
user.email = createUserDto.email;
user.password = createUserDto.password;
const user = this.usersRepository.create(createUserDto);

return this.usersRepository.save(user);
}
Expand Down

0 comments on commit f426b98

Please sign in to comment.