talawa-api / Exports / helpers/event/createEventHelpers/createRecurringEvent
Module: helpers/event/createEventHelpers/createRecurringEvent
Table of contents
Functions
Functions
createRecurringEvent
▸ createRecurringEvent(args
, creatorId
, organizationId
, session
): Promise
<InterfaceEvent
>
This function creates the instances of a recurring event upto a certain date.
Parameters
Name | Type | Description |
---|---|---|
args | MutationCreateEventArgs | payload of the createEvent mutation |
creatorId | string | _id of the creator |
organizationId | string | _id of the organization the events belongs to |
session | ClientSession | - |
Returns
Promise
<InterfaceEvent
>
Created recurring event instance
Remarks
The following steps are followed:
- Create a default recurrenceRuleData.
- Generate a recurrence rule string based on the recurrenceRuleData.
- Create a baseRecurringEvent on which recurring instances would be based.
- Get the dates for recurring instances.
- Create a recurrenceRule document.
- Generate recurring instances according to the recurrence rule.
Defined in
src/helpers/event/createEventHelpers/createRecurringEvent.ts:27