Skip to content

fix(api): add membership/round-validity verification to contribution … - #318

Open
dorismaduegbunam wants to merge 1 commit into
cocor-tech:masterfrom
dorismaduegbunam:fix/issues-204-202
Open

fix(api): add membership/round-validity verification to contribution …#318
dorismaduegbunam wants to merge 1 commit into
cocor-tech:masterfrom
dorismaduegbunam:fix/issues-204-202

Conversation

@dorismaduegbunam

Copy link
Copy Markdown

closes #204
closes #202

#204: fix(api): add membership/round-validity verification to contribution and payout recording

  • Added membership verification (circleService.IsMember()) before recording contributions and payouts
  • Added round validity check against circle's CurrentRound before recording
  • Fixed OnTime determination - now correctly set based on whether the round number is valid (1 <= round <= current round)
  • Updated contribution and payout services to validate membership and round validity server-side
  • Added OnTime and UpdatedAt fields to Payout model

#202: fix(api): apply consistent server-side validation across all handlers via the validator package

  • Added validator.Validate.Struct calls to Contribute and TriggerPayout handlers in circle_handler.go
  • Changed Gin binding tags to validate tags for consistency with the custom validator package
  • Added validator import to contribution_handler.go and payout_handler.go
  • Ensures all request bodies/params are validated server-side with uniform validation error shape

…and payout recording

- Verify membership + open/valid round before recording
- Correct OnTime determination against deadline
- Close cocor-tech#204
@drips-wave

drips-wave Bot commented Sep 1, 2026

Copy link
Copy Markdown

@dorismaduegbunam 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant