Skip to content

Instantly share code, notes, and snippets.

@xlewkanx
Created July 27, 2015 14:40
Show Gist options
  • Select an option

  • Save xlewkanx/027135cd70ac12135911 to your computer and use it in GitHub Desktop.

Select an option

Save xlewkanx/027135cd70ac12135911 to your computer and use it in GitHub Desktop.
var $posterService = require('../../service/posters');
router.get('/posters/:id', function(req, res, next) {
var id = new Number(req.params.id).toString();
if (id != "NaN")
res.render('sliders',{
posters: $posterService.pull(id)
});
else
next({
err: "No sliders found"
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment