-
Notifications
You must be signed in to change notification settings - Fork 2
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
F24/julia/activity management endpoints I #54
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trinity-y
reviewed
Jan 31, 2025
trinity-y
approved these changes
Jan 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me other than that typo!!
shencynthia
reviewed
Feb 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple comments for small improvements but otherwise great work on this!! 🔥🔥🔥
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Notion ticket link
Activity Management Endpoints I
Implementation description
activity_id
column from activity modelcreated_at
andupdated_at
columns in activity modelactivityUpdateDtoValidator
with all fields optional so that any subset of fields can be updatedbackend/typescript/middlewares/validators/util.ts
Steps to test
GET /activities
- Retrieves all activities.a. Accessible by Volunteer/Staff/Admin/Behaviourist
GET /activities/<id>
- Retrieves a specific activity by its ID.a. Accessible by Volunteer/Staff/Admin/Behaviourist
b. Invalid id
c. id not in database
POST /activities
- Creates a new activity. It can be created without a user and scheduled times.a. Not accessible by Volunteer/Staff roles
b. Accessible by Admins and Behaviourists
c. Creating without user, scheduledSartTime, startTme, endTime, notes
d. Creating with required field missing (idk if this error message is misleading)
e. Creating with invalid date
f. Creating with invalid other fields
g. Creating with non-existent petId, activityTypeId, or userId
PATCH /activities/<id>
- Updates other details of an activity (generic endpoint).a. Not accessible by Volunteer/Staff roles
b. Accessible by Admins and Behaviourists. Able to update any subset of fields
c. Trying to set a required field to null
d. Invalid id
e. id not in database
DELETE /activities/<id>
- Deletes an activity.a. Not accessible by Volunteer/Staff roles
b. Accessible by Admins and Behaviourists
c. Invalid id, id not in database tests are similar
What should reviewers focus on?
Checklist