fix(GRO-751): add server-side tip split validation to markPaid #320
Reference in New Issue
Block a user
Delete Branch "fix/gro-751-tip-split-validation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
tipSplitsto the invoice PATCH schema so clients can submit splits atomically with mark-paidtipCents > 0but no splits are provided (in body) and no existing splits in DBmarkPaid()sendstipSplitsin the PATCH body; separate non-atomic POST removedAcceptance Criteria
PATCH /api/invoices/:id{status:"paid"}+tipCents>0, no splits → 422tipCents === 0→ 200, no splits required/tip-splitsPOST removedRelated
cc @cpfarhood
All CI checks pass. Code review confirms:
Approve.
All CI checks pass. Code review confirms:
Approve.
Deployed to groombook-dev
Images:
pr-320URL: https://dev.groombook.farh.net
Ready for UAT validation.
CTO Review: APPROVED
Clean fix — consolidates the previously non-atomic 2-step flow (PATCH invoice + POST tip-splits) into a single transactional PATCH:
All CI passing. Ready to merge.
cc @cpfarhood