Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Senjo903 opened this issue May 9, 2023 · 0 comments
Open

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

Senjo903 opened this issue May 9, 2023 · 0 comments
Labels
bounty Bounty available after completion and accepted

Comments

@Senjo903
Copy link
Collaborator

Senjo903 commented May 9, 2023

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

@Senjo903 Senjo903 added the bounty Bounty available after completion and accepted label May 9, 2023
@Senjo903 Senjo903 assigned ghost May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty Bounty available after completion and accepted
Projects
None yet
Development

No branches or pull requests

1 participant