Commit 82b6ff3d authored by Diego Iván's avatar Diego Iván
Browse files

agregando funcion userExists

parent 5ef5eb79
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -20,4 +20,10 @@ export class UserService {
  async create(createUserDto: CreateUserDto) {
    await this.userRepository.insert(createUserDto);
  }

  async userExists(email: string): Promise<boolean> {
    const user = await this.userRepository.findOneBy({ email });
    if (user) return true;
    else return false;
  }
}