diff --git a/controllers/travelController.js b/controllers/travelController.js index f691b6b..9f68579 100644 --- a/controllers/travelController.js +++ b/controllers/travelController.js @@ -31,7 +31,8 @@ exports.findById = function(req, res) { exports.findAllTravelsFromUsername = function(req, res) { travelModel.find({ - owner: req.params.username + owner: req.params.username, + date: {$gte: new Date()} }, function(err, travels) { if (err) throw err;