manage date filter in home

This commit is contained in:
les
2020-10-28 01:28:21 +01:00
parent b77339cbf1
commit fc02be7db5
2 changed files with 34 additions and 24 deletions

View File

@@ -421,8 +421,8 @@ const eventController = {
async _select ({ start, end, tags, places }) {
debug('_select start: %s, end: %s, tags: %s', dayjs.unix(start), end, tags)
const where = {
// confirmed event only
recurrent: null,
// confirmed event only
is_visible: true,
[Op.or]: {
start_datetime: { [Op.gt]: start },
@@ -430,9 +430,9 @@ const eventController = {
}
}
// if (end) {
// where.end_datetime = { [Op.lt]: end }
// }
if (end) {
where.start_datetime = { [Op.lt]: end }
}
if (places) {
where.placeId = places.split(',')