talawa-api / Exports / helpers/event/createEventHelpers/createSingleEvent
Module: helpers/event/createEventHelpers/createSingleEvent
Table of contents
Functions
Functions
createSingleEvent
▸ createSingleEvent(args
, creatorId
, organizationId
, session
): Promise
<InterfaceEvent
>
This function generates a single non-recurring event.
Parameters
Name | Type | Description |
---|---|---|
args | MutationCreateEventArgs | the arguments provided for the createEvent mutation. |
creatorId | string | _id of the current user. |
organizationId | string | _id of the current organization. |
session | ClientSession | - |
Returns
Promise
<InterfaceEvent
>
The created event.
Remarks
The following steps are followed:
- Create an event document.
- Associate the event with the user
- Cache the event.
Defined in
src/helpers/event/createEventHelpers/createSingleEvent.ts:19