Skip to content

Commit

Permalink
✏️ Fix: users.service 문법 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
labyrinth30 committed Jun 27, 2024
1 parent 665b55f commit de67eab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export class UsersService {
constructor(
@InjectRepository(UsersModel)
private readonly usersRepository: Repository<UsersModel>,
) {}
) {
}

async createUser(dto: CreateUserDto) {
const nicknameExist: boolean = await this.usersRepository.exists({
where: {
Expand Down Expand Up @@ -37,6 +39,7 @@ export class UsersService {

return newUser;
}

async getUserByEmail(email: string) {
const user = await this.usersRepository.findOne({
where: {
Expand All @@ -47,6 +50,5 @@ export class UsersService {
throw new BadRequestException('존재하지 않는 이메일입니다.');
}
return user;


}
}

0 comments on commit de67eab

Please sign in to comment.