Skip to content
Snippets Groups Projects

Create endpoint for user-registration

Compare and Show latest version
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -75,7 +75,7 @@ export async function register(req,res){
}).catch(error => {
return res.status(500).send({
error : "Enable to hashed password"
error : "Enable to hash password"
})
})
}
@@ -140,7 +140,7 @@ export async function getUser(req,res){
try {
if(!username) return res.status(501).send({error: "Invalid Username"});
if(!username) return res.status(401).send({error: "Invalid Username"});
UserModel.findOne({username}, function(err, user){
if(err) return res.status(500).send({err});
Loading