Skip to content

Instantly share code, notes, and snippets.

@ramazankanbur
Last active October 10, 2019 15:08
Show Gist options
  • Save ramazankanbur/941e40194a2726fdb5d62eea03826c6a to your computer and use it in GitHub Desktop.
Save ramazankanbur/941e40194a2726fdb5d62eea03826c6a to your computer and use it in GitHub Desktop.
change
router.post('/login', (req, res, next) => {
var promise = userController.loginControl(req.body);
promise.then((loginControlResult) => {
if (loginControlResult.success) {
res.send({ token: loginControlResult.token, message: loginControlResult.message,success:true });
}
else {
res.send({ message: loginControlResult.message ,success:false});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment