Skip to content

Commit

Permalink
fix: register
Browse files Browse the repository at this point in the history
  • Loading branch information
proohit committed Nov 4, 2022
1 parent 103d3c8 commit c14952c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion accountingapp-backend/src/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class UsersService {
}

async create(username: string, password: string, email: string) {
if (await this.getByUsername(username)) {
if (await this.usersRepository.findOneBy({ username })) {
throw new HttpException(
'Username already exists',
HttpStatus.BAD_REQUEST,
Expand Down

0 comments on commit c14952c

Please sign in to comment.