Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- router.get('/auth/:user/:pass', function(req, res, next) {
- mongo.findDocuments('Users', {"username" : req.params.user}, function(docs) {
- var user = docs[0];
- if(!user) {
- console.log('username does not exsist');
- return;
- } else {
- if(!user.password == req.params.pass) {
- console.log('password is incorrect');
- return;
- } else {
- console.log('successfull combo')
- }
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement