mirror of
https://github.com/arnaucube/openEventsPlatformServer.git
synced 2026-02-07 03:36: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) {
|
exports.getEventsByFollowingArray = function(req, res) {
|
||||||
|
if(req.body.users==null)
|
||||||
|
{
|
||||||
|
res.status(200).jsonp(null);
|
||||||
|
}
|
||||||
eventModel.find({
|
eventModel.find({
|
||||||
date: {$gte: new Date()},
|
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()
|
.lean()
|
||||||
.populate('user', 'username img shortDescription')
|
.populate('user', 'username img shortDescription')
|
||||||
|
|||||||
Reference in New Issue
Block a user