Case insensitive

This commit is contained in:
Hongbo Wu
2023-03-14 14:42:56 +08:00
parent 461b348dc0
commit ee2487ff01

View File

@ -118,6 +118,6 @@ export const getUserByEmail = async (email: string): Promise<User | null> => {
return getRepository(User)
.createQueryBuilder('user')
.leftJoinAndSelect('user.profile', 'profile')
.where('LOWER(email) = LOWER(:email)', { email })
.where('LOWER(email) = LOWER(:email)', { email }) // case insensitive
.getOne()
}