getallevents except alerts

This commit is contained in:
arnaucode
2017-02-21 14:17:48 +01:00
parent 509f061016
commit e04d1c6fce
2 changed files with 3 additions and 2 deletions

View File

@@ -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')