-
Notifications
You must be signed in to change notification settings - Fork 0
[SSF-126]: Recurring donations backend #98
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
base: main
Are you sure you want to change the base?
Conversation
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.
why did you spell recurrence wrong in every single place 😭
amywng
left a comment
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.
last couple things!
| example: ['2024-07-01T00:00:00Z', '2024-08-01T00:00:00Z'], | ||
| nullable: true, | ||
| }, | ||
| occurencesRemaining: { type: 'integer', example: 2, nullable: true }, |
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.
occurrence has two r's...
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.
i hate replace all
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 not a replace all issue
amywng
left a comment
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.
💯
ℹ️ Issue
Closes #126
📝 Description
This PR was a simple backend update to fix makes donations support reoccurances. We had an implementation suggested in the ticket, which I followed pretty closely. I also made a migration for these changes, ensuring that all fields were considered nullable, until the reoccurance field became somehting other than once.
I also altered the backend create endpoint accordingly. I made it so that, if the recurrance type is not ONCE, then all 3 other fields need to be filled out, or we cannot create a donation.
The idea with this migration now, is that we can easily implement recurruing donations as follows
nextDonationDatesarray✔️ Verification
🏕️ (Optional) Future Work / Notes
Now that we have this, we need to being handling actually updating the endpoint daily. This will include the following: