Skip to content

Fix/796 797 798 799 backend bugs - #850

Merged
OlaGreat merged 3 commits into
OlaGreat:mainfrom
olywales-stack:fix/796-797-798-799-backend-bugs
Jul 25, 2026
Merged

Fix/796 797 798 799 backend bugs#850
OlaGreat merged 3 commits into
OlaGreat:mainfrom
olywales-stack:fix/796-797-798-799-backend-bugs

Conversation

@olywales-stack

Copy link
Copy Markdown
Contributor

Summary

  • Validate milestone targetAmount as a positive decimal (up to 7 places) on both create and update, instead of letting Prisma throw an unhandled 500 on non-numeric input
  • Fix drip scheduler nextRunAt calculation to base off the original support.nextRunAt instead of the late-processing time, preventing schedule drift
  • Add a dedicated rate limiter (10 req/min per IP) to the RSS feed endpoint (GET /profiles/:username/feed.xml)
  • Guard milestone updates: reject targetAmount changes on already-reached milestones, and auto-mark a milestone as reached if a lowered targetAmount drops to/below currentAmount

Test plan

  • PATCH a reached milestone with a targetAmount change → expect 400
  • PATCH an active milestone lowering targetAmount below currentAmount → status flips to reached
  • POST/PATCH milestone with targetAmount: 'abc', '0', '-50' → expect 400, not 500
  • Hit feed.xml >10 times/min from one IP → expect 429
  • Verify drip scheduler run processed late still lands on the original weekly/monthly cadence

Closes #796
Closes #797
Closes #798
Closes #799

- Reject non-numeric/zero/negative targetAmount values on milestone
  create and update instead of letting Prisma throw an unhandled 500
- Base recurring support nextRunAt on the original scheduled time
  instead of the processing time, so late runs no longer drift the
  schedule forward

Closes OlaGreat#797
Closes OlaGreat#796
- Add a dedicated feedLimiter (10 req/min per IP) to GET
  /profiles/:username/feed.xml
- Reject PATCH requests that change targetAmount on an already-reached
  milestone, and auto-mark a milestone as reached if the new
  targetAmount drops to or below currentAmount

Closes OlaGreat#799
Closes OlaGreat#798
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@olywales-stack Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@OlaGreat
OlaGreat merged commit b3ea07b into OlaGreat:main Jul 25, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment