Skip to content

Creation of route of daily events and sending messages by slack #48

Description

@Senjo903

Overview

Create a POST endpoint :
/api/event

  • should receive several values ​​in json format by the body:
{
"name" : "Fullstack",
"start" : "2023-05-09T23:19:34.000Z",
"end" : "2023-05-09T23:29:34.000Z",
"calendar_description" : "text",
"daily_message" : "text",
"slack_message" : "text"
}
  • create the new record in the "Event" table
  • for now we will only handle 3 types of events: 'daily message', 'celebration', 'meet'
    Image
  • In all 3 cases, an event must be created in the calendar process.env.CALENDAR_CELEBRATION_ID accessing through the configuration variables.
  • in case of being type "meet" store the link in the event record "link_meet"
  • If it is a "daily message" type, use the "node-schedule" library to send the "daily_message" data through the slack channel process.env.CHANNEL_SLACK_CELEBRATION
    when the message is sent save the "ts" in the value "ts_daily_message" in case you need to delete the message in the future have reference

Additional Information:

  • there is already a file to integrate the daily message
    Image

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bountyBounty available after completion and accepted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions