mirror of
https://github.com/arnaucube/openEventsPlatformServer.git
synced 2026-02-06 19:26:39 +01:00
fixed getEventsByFollowingArray
This commit is contained in:
@@ -175,9 +175,14 @@ això retorna els events d'aquests users que segueixes
|
||||
*/
|
||||
|
||||
exports.getEventsByFollowingArray = function(req, res) {
|
||||
if(req.body.users==null)
|
||||
{
|
||||
res.status(200).jsonp(null);
|
||||
}
|
||||
eventModel.find({
|
||||
date: {$gte: new Date()},
|
||||
'username': req.body.users
|
||||
'user': req.body.users,
|
||||
type: {$nin: ["alert"]}//cal filtrar per type d'event, aquí només agafem els type: alert
|
||||
})
|
||||
.lean()
|
||||
.populate('user', 'username img shortDescription')
|
||||
|
||||
Reference in New Issue
Block a user