deleteRecurringEventInstances
talawa-api / helpers/event/deleteEventHelpers/deleteRecurringEventInstances / deleteRecurringEventInstances
Function: deleteRecurringEventInstances()
> deleteRecurringEventInstances(event
, recurrenceRule
, baseRecurringEvent
, session
): Promise
<void
>
Deletes all instances or thisAndFollowingInstances of a recurring event.
Parameters
event
null
| InterfaceEvent
recurrenceRule
The recurrence rule associated with the instances.
baseRecurringEvent
The base recurring event from which instances are derived.
session
ClientSession
Returns
Promise
<void
>
Remarks
This function performs the following steps:
- Constructs a query object to fetch instances based on the delete type.
- Retrieves and deletes all associated documents (attendees, users, profiles, action items).
- Deletes the instances themselves.
- Updates the recurrence rule and base recurring event as needed.
- Removes any dangling documents related to the recurrence rule and base recurring event.
Defined in
src/helpers/event/deleteEventHelpers/deleteRecurringEventInstances.ts:32