Skip to content

Instantly share code, notes, and snippets.

@ralphtheninja
Created January 31, 2015 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ralphtheninja/1ce472bc4dc0215d502f to your computer and use it in GitHub Desktop.
Save ralphtheninja/1ce472bc4dc0215d502f to your computer and use it in GitHub Desktop.
function eachUser(user) {
// Suchabfrage starten
graphabfrage.get(user.id, function(err, res) {
if (err) console.log('FEHLER updatelocationids: '.JSON.stringify(err));
dblocations.findOne({ id: user.id }, function (err, fbitem2){
// bla bla ..
})
})
}
function foo(err, users) {
users.forEach(eachUser)
}
function getLocations(req, res) {
dblocations.find({ $or: [{"blacklist":"0"},{"whitelist":"1"}] } ).exec(foo)
}
app.get('/v1/getids', getLocations)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment