Fix for event selection
This commit is contained in:
@@ -32,7 +32,7 @@ const filterEvents = async (req, res) => {
|
||||
]
|
||||
}
|
||||
},
|
||||
{ dayOfWeek: { [Op.ne]: null } }
|
||||
{ dayOfWeek: { [Op.gte]: 0 } }
|
||||
]
|
||||
};
|
||||
|
||||
@@ -44,7 +44,8 @@ const filterEvents = async (req, res) => {
|
||||
{ model: EventPlace, as: 'eventPlace' },
|
||||
{ model: EventType, as: 'eventType' },
|
||||
{ model: ContactPerson, as: 'contactPersons', through: { attributes: [] } }
|
||||
]
|
||||
],
|
||||
logging: console.log // Log the generated SQL query
|
||||
});
|
||||
return res.json({ events });
|
||||
}
|
||||
@@ -60,7 +61,7 @@ const filterEvents = async (req, res) => {
|
||||
{ model: EventPlace, as: 'eventPlace' },
|
||||
{ model: EventType, as: 'eventType' },
|
||||
{ model: ContactPerson, as: 'contactPersons', through: { attributes: [] } }
|
||||
]
|
||||
],
|
||||
});
|
||||
return res.json({ events });
|
||||
}
|
||||
@@ -92,7 +93,8 @@ const filterEvents = async (req, res) => {
|
||||
{ model: EventPlace, as: 'eventPlace' },
|
||||
{ model: EventType, as: 'eventType' },
|
||||
{ model: ContactPerson, as: 'contactPersons', through: { attributes: [] } }
|
||||
]
|
||||
],
|
||||
logging: console.log // Log the generated SQL query
|
||||
});
|
||||
const displayFields = request.display ? request.display : [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user