-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Scheduling API Clients #26
Conversation
} | ||
}; | ||
|
||
const createSchedule = async (schedule: Schedule): Promise<Schedule> => { |
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.
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.
This is fine! In fact this is how it should be. To create a donation, you need to to be logged in and that donor should be in the donors table.
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.
On a semi-related note, do we still allow the donorId
property to be updated when we update a schedule? Or do we keep it so that the donorId stays consistent with whichever donor is logged in so they can only edit their scheduled drop-offs?
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.
donorId
should not be updated and the Frontend will never pass donorId
to the updateSchedule function / endpoint.
8984793
to
5303d99
Compare
Notion ticket link
Scheduling API Client
Implementation description
Steps to test
auth/register
sample body:
{ "firstName": "Test", "lastName": "User", "role": "Donor", "email": "test@email.com", "phoneNumber":"8888888888", "password": "123456", "businessName": "Test Business" }
http://localhost:3000/login
onClick
function that triggers the following api clients:SchedulingAPIClient.createSchedule
SchedulingAPIClient.getSchedules
SchedulingAPIClient.getScheduleById
SchedulingAPIClient.updateSchedule
SchedulingAPIClient.deleteSchedule
What should reviewers focus on?
Make sure requests are successful!
Checklist