fix potential existing bug if model was not user

This commit is contained in:
shayneczyzewski 2022-06-27 14:32:24 -04:00
parent 47570f6645
commit 91eec4540f

View File

@ -12,7 +12,7 @@ export default handleRejection(async (req, res) => {
// Try to fetch user with the given email.
const {= userEntityLower =} = await prisma.{= userEntityLower =}.findUnique({ where: { email: args.email.toLowerCase() } })
if (!user) {
if (!{= userEntityLower =}) {
return res.status(401).send()
}