fix show_recurrent in embed list
This commit is contained in:
@@ -12,6 +12,7 @@ const exportController = {
|
||||
const type = req.params.type
|
||||
const tags = req.query.tags
|
||||
const places = req.query.places
|
||||
const show_recurrent = !!req.query.show_recurrent
|
||||
|
||||
const where = {}
|
||||
const yesterday = moment().subtract('1', 'day').unix()
|
||||
@@ -25,6 +26,10 @@ const exportController = {
|
||||
where.placeId = places.split(',')
|
||||
}
|
||||
|
||||
if (!show_recurrent) {
|
||||
where.parentId = null
|
||||
}
|
||||
|
||||
const events = await Event.findAll({
|
||||
order: ['start_datetime'],
|
||||
attributes: { exclude: ['is_visible', 'recurrent', 'createdAt', 'likes', 'boost', 'userId', 'placeId'] },
|
||||
|
||||
Reference in New Issue
Block a user