Skip to content
Snippets Groups Projects
Commit cfdff4d6 authored by Inès Yeterian's avatar Inès Yeterian
Browse files

clean dernierToucan url

parent 5fa635ac
No related branches found
No related tags found
1 merge request!5Last toucan url
...@@ -107,7 +107,7 @@ router.route("/delete/:id") ...@@ -107,7 +107,7 @@ router.route("/delete/:id")
}); });
router.get('/dernierToucan', (req, res) => { router.get('/dernierToucan', (req, res) => {
Toucan.find((req.query.before || req.query.after) ? {"date": optionsDate} : null) Toucan.find()
.sort({date:-1}) .sort({date:-1})
.limit(1) .limit(1)
.exec(function (err, toucan) { .exec(function (err, toucan) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment