Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exports.authUser = function(req, res) {
- var user = {
- email: req.body.email,
- password: req.body.password
- };
- User.findOne({email: req.body.email, password: req.body.password}, function(err) {
- if(user) {
- return res.status(200).json(user)
- }
- return res.status(500).json('Wrong login or password', err)
- })
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement