mirror of
https://github.com/arnaucube/commonroutesServer.git
synced 2026-02-28 05:26:42 +01:00
findAllTravelsFromUsername filter by future dates
This commit is contained in:
@@ -31,7 +31,8 @@ exports.findById = function(req, res) {
|
|||||||
|
|
||||||
exports.findAllTravelsFromUsername = function(req, res) {
|
exports.findAllTravelsFromUsername = function(req, res) {
|
||||||
travelModel.find({
|
travelModel.find({
|
||||||
owner: req.params.username
|
owner: req.params.username,
|
||||||
|
date: {$gte: new Date()}
|
||||||
}, function(err, travels) {
|
}, function(err, travels) {
|
||||||
|
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
|
|||||||
Reference in New Issue
Block a user