Skip to content

Instantly share code, notes, and snippets.

@timhudson
Last active December 21, 2015 08:59
Show Gist options
  • Save timhudson/6282294 to your computer and use it in GitHub Desktop.
Save timhudson/6282294 to your computer and use it in GitHub Desktop.
var query = {$or: [
{_id: req.params.id, app: req.app.id},
{altId: req.params.id, app: req.app.id}
]}
Show.findOne(query, function(err, show) {
// send them the show
})
{
_id: ObjectId('5124f5bcd214260200000117'),
altId: '18',
title: 'Compulsive Love',
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment