mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-09-11 15:26:19 +03:00
fix potential existing bug if model was not user
This commit is contained in:
parent
47570f6645
commit
91eec4540f
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user