diff --git a/controllers/eventController.js b/controllers/eventController.js index c8e5825..b83695f 100644 --- a/controllers/eventController.js +++ b/controllers/eventController.js @@ -11,7 +11,8 @@ var pageSize=config.pageSize; exports.getAllEvents = function(req, res) { eventModel.find({ - date: {$gte: new Date()}//cal filtrar per type d'event, de si es alert o no + date: {$gte: new Date()}, + type: {$nin: ["alert"]}//cal filtrar per type d'event, aquí només agafem els type: alert }) .lean() .populate('user', 'username img shortDescription') diff --git a/server.js b/server.js index 529ae38..85e815b 100644 --- a/server.js +++ b/server.js @@ -32,7 +32,7 @@ var userMdl = require('./models/userModel')(app, mongoose); var userCtrl = require('./controllers/userController'); var eventMdl = require('./models/eventModel')(app, mongoose); var eventCtrl = require('./controllers/eventController'); -var alertMdl = require('./models/alertModel')(app, mongoose); +//var alertMdl = require('./models/alertModel')(app, mongoose); //var alertCtrl = require('./controllers/alertController'); //CORS