Skip to content

Commit

Permalink
minor correction
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Apr 19, 2024
1 parent 37b8862 commit d554158
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export const generateRecurrenceRuleString = (
}
});

// sort the weekDays array
recurrenceWeekDays?.sort();

// string representing the days of the week the event would recur
const weekDaysString = recurrenceWeekDays?.length
? recurrenceWeekDays.join(",")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const generateRecurringEventInstances = async ({
);
}

// get the recurring event instances
const recurringInstances: InterfaceRecurringEvent[] = [];
recurringInstanceDates.map((date): void => {
// get the start date for the instance
Expand All @@ -107,7 +108,7 @@ export const generateRecurringEventInstances = async ({
recurringInstances.push(createdEventInstance);
});

//Bulk insertion in database
// Bulk insertion in database
const recurringEventInstances = await Event.insertMany(recurringInstances, {
session,
});
Expand Down

0 comments on commit d554158

Please sign in to comment.