-
-
Save moonpatroller/4caf12ef82547567f6d998c8eac9d3e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doesUserExist() { | |
pg.connect(conString, function (err, client, done) { | |
client.query('SELECT user_id FROM clients.users where user_id=$1', [req.body.user], function(err, result) { | |
if (err) { | |
console.log('error fetching client from pool', err); | |
return; | |
} | |
doNext(result.rowCount == 1); | |
}); | |
}); | |
} | |
function doNext(userExists) { | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment