Commit f9b43780 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Fix issues with Pagination model

parent cb939cc9
......@@ -26,6 +26,8 @@ export default class EventController {
const date = `${new Date().toISOString().split('.')[0]}Z`;
return {
where: {
show_website: true,
time_advertising_start: { $lt: date },
time_advertising_end: { $lt: date },
$and: [
{ $or: [{ time_start: null }, { time_start: { $lt: date } }] },
......@@ -67,6 +69,7 @@ export default class EventController {
return {
where: {
show_website: true,
time_advertising_start: { $lt: date },
time_register_start: { $lt: date },
time_register_end: { $gt: date },
},
......
......@@ -116,9 +116,7 @@ export default class PaginationController {
} else {
({ additionalQuery } = this);
}
const date = `${new Date().toISOString().split('.')[0]}Z`;
const query = Query.merge(this.query, additionalQuery, {
where: { show_website: true, time_advertising_start: { $lt: date } },
max_results: this.query.max_results || 10,
page: pageNum,
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment