VikeLabs/Collabify

[BACKEND] - Create database function for adding an event to group (addEventToGroup)

Closed this issue · 0 comments

Screenshot 2022-10-22 125507

^ This is an example of how we do this for availability

Task:

  • Create a new file in /api-lib/db called event.js
  • Import the Event model from ../model
  • Save the event model first
  • then get the savedDoc._id and push that into the events array in Group model