Photo.findOne({flickrId: id}, function(err, data) {
    if (err) {
      if(cb) cb(err)
      else res.json(500, err);
      return;