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

add dernierToucan url

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