mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-30 17:50:07 +08:00
bf0bf99ef4
* feat(quota-store): separate revoke and delete semantics for redemption codes
- PATCH /api/admin/quota-store/storage-codes/:code accepts { revokedAt } to
revoke a code (keeps it visible, prevents future redemptions)
- DELETE /api/admin/quota-store/storage-codes/:code removes eligible codes
- Added revokeStorageCodeSchema (shared) with zValidator on PATCH route
- Fixed revokeStorageRedemptionCode API fn to use PATCH with revokedAt payload
- Added deleteStorageRedemptionCode API fn using DELETE
- UI: separate Revoke and Delete buttons per code row with distinct disabled rules
- Revoke disabled when already revoked or fully redeemed
- Delete disabled when any redemptions exist (usesCount > 0)
- Updated confirmation copy to describe product outcome, not technical action
- i18n: added delete keys in en.json and zh.json; updated revokeConfirm copy
- Updated integration, unit, and component tests
Agent-Profile: https://agent-kanban.dev/agents/f68cfbce6456edb5
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: align storage code revoke contract
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>