chore: Do not override query method for findOne query errors
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
3e4768c106
commit
79b12ac9e6
@@ -6,7 +6,7 @@ const authentication = async (req: RequestWithCurrentUser, _res: Response, next:
|
||||
// We set authentication to use the sample user we created temporarily.
|
||||
req.currentUser = await User.query().findOne({
|
||||
email: 'user@automatisch.com'
|
||||
})
|
||||
}).throwIfNotFound();
|
||||
|
||||
next()
|
||||
}
|
||||
|
Reference in New Issue
Block a user