Skip to content

Commit

Permalink
fix: refector user already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
FREDVUNI committed Oct 28, 2023
1 parent 1b6a487 commit 528e1bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const createUser = async (req, res) => {
username: username,
},
});
if (!user)
if (user)
return res.status(403).json({
error: "User already exists.",
});
Expand Down

0 comments on commit 528e1bc

Please sign in to comment.