aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/user.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/controllers/user.js b/server/controllers/user.js
index 141d194..7a2b78a 100644
--- a/server/controllers/user.js
+++ b/server/controllers/user.js
@@ -22,7 +22,7 @@ module.exports = {
status: "User successfully registered!",
token: jwt.sign({sub: user._id}, masterKey, {expiresIn: "1d"})
}))
- .catch(err => res.json({
+ .catch(err => res.status(400).json({
status: "Error when registering user!",
error: err
}));