VRMS
VRMS copied to clipboard
Create an Endpoint to GET Recurring Events by Project ID
Overview
The civic tech jobs team would like to be able to return a list of all recurring events for a specific project.
Action Items
- [ ] Add a new endpoint GET /api/projects/:ProjectId/recurringevents that returns all recurring events based on the project id
Resources/Instructions
The endpoint should return an array of recurring events records in the following format. It would also probably be helpful if date, startTime and endTime fields were updated to reflect the actual date in the current week instead of being based on when the record was created. Also add a field for the string dayOfWeek value to make the results easier to consume new Intl.DateTimeFormat("en-US", { weekday: "long" }).format(new Date(startDate));
[
{
"location": {
"city": "Santa Monica",
"state": "CA",
"country": "USA"
},
"owner": {
"ownerId": "123458"
},
"brigade": "Hack for LA",
"checkInReady": false,
"_id": "5eb7240f509367be7272cf69",
"hacknight": "Online",
"name": "Lucky Parking Team Meeting",
"eventType": "Team Meeting",
"description": "Team Meeting",
"project": {
"recruitingCategories": [],
"partners": [
"Seeking"
],
"_id": "5ec32abda973810017c0de0d",
"name": "Lucky Parking",
"description": "A platform looking for nearby street parking with least possibility of getting citation.",
"githubIdentifier": "216854923",
"projectStatus": "Active",
"location": "Westside",
"githubUrl": "https://github.com/hackforla/lucky-parking",
"slackUrl": "https://hackforla.slack.com/archives/CPFDMSV6V",
"googleDriveUrl": "https://drive.google.com/drive/folders/1qq6w-eCvjxgfiQCCxPN9_0ah1DLTgl27",
"googleDriveId": "1qq6w-eCvjxgfiQCCxPN9_0ah1DLTgl27",
"hflaWebsiteUrl": "https://www.hackforla.org/projects/lucky-parking",
"videoConferenceLink": "https://us02web.zoom.us/j/84817446708?pwd=QW5RVER2SkVTWnZkN25ZY2d2RzNTdz09",
"lookingDescription": "- Frontend Software Engineer \n- Backend Software Engineer \n- Advanced Data Scientist \n- Python Enthusiast",
"createdDate": "2020-05-19T00:39:25.640Z",
"__v": 0
},
"date": "2020-05-12T00:30:00.000Z",
"startTime": "2020-05-12T01:00:00.000Z",
"endTime": "2020-05-12T02:00:00.000Z",
"dayOfWeek": '
"hours": 5,
"createdDate": "2020-05-09T21:43:43.519Z",
"updatedDate": "2021-04-20T21:43:43.519Z",
"__v": 0
},
]