mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-21 05:09:18 +00:00
improvement: better error handling
This commit is contained in:
@@ -8,7 +8,7 @@ exports.store = async (req, res, next) => {
|
||||
|
||||
const user = await User.findOne({ where: { email: email } });
|
||||
if (!user) {
|
||||
return res.status(401).json({ error: "No user found with this email" });
|
||||
return res.status(404).json({ error: "No user found with this email" });
|
||||
}
|
||||
|
||||
if (!(await user.checkPassword(password))) {
|
||||
|
||||
Reference in New Issue
Block a user