Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/controllers/auth.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async function signup(req, res, next) {
//check for existing email
const existing = await User.findOne({ email });
if (existing) {
return res.json({ email: existing.email });
return res.status(409).json({ error: 'An account with this email already exists' });
}
const hashed = await bycrypt.hash(password, 10);
let user;
Expand Down
Loading