fix to filter out future repeating availbilities

This commit is contained in:
Dobromir Popov
2024-05-28 22:29:29 +03:00
parent 9dd43fbc34
commit 4f8d72c162

View File

@ -331,7 +331,7 @@ async function filterPublishersNew(selectFields, filterDate, isExactTime = false
{ dayOfMonth: null },
//{ dayofweek: dayOfWeekEnum }, // we want all days of the week for now
// moved down to conditional filters
// { startTime: { lte: filterTimeTo } }, // we ignore startTime as it will be filtered later only by the time and not by date.
{ startTime: { lte: filterTimeTo } }, // we ignore startTime as it will be filtered later only by the time and not by date. ! but we need it to filter future repeating availabilities that are not yet started on the request date
{
OR: [ // OR condition for repeatUntil to handle events that either end after filterDate or repeat forever
{ endDate: { gte: filterTimeFrom } }, // endDate included