Commit 9ccb0181 authored by Inès Yeterian's avatar Inès Yeterian
Browse files

go back to normal for now

parent 808dc095
......@@ -124,9 +124,9 @@ router.route("/img/:id")
}
});
router.route("/pdf/:id")
.get(celebrate({params: validId}), function(req,res) {
Toucan.findOne({_id: mongoose.Type.ObjectId(req.params.id)}, (err,data) => {
router.route("/pdf/:title")
.get(celebrate({params: validTitle}), function(req,res) {
Toucan.findOne({title: req.params.title}, (err,data) => {
if (err) {
res.end(500);
return;
......@@ -139,4 +139,5 @@ router.route("/pdf/:id")
}
);});
module.exports = router;
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment