refactor(vouchers): move voucher routes out of /enakgame
Vouchers are what EnakPoint is redeemed for, wherever it came from, so they are not part of EnakGame. Their only link to it is the budget attribution, which does not change. - Admin: /marketing/enakgame/vouchers... -> /marketing/vouchers... - Customer: /customer/enakgame/vouchers -> /customer/vouchers, /customer/enakgame/vouchers/:id/redeem -> /customer/vouchers/:id/redeem, /customer/enakgame/redemptions -> /customer/vouchers/redemptions Roles, handlers and logic stay the same. No client calls these endpoints yet. RFC §7.4 and §11 updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
18e87398bb
commit
1bb071aec6
@@ -106,7 +106,7 @@ func (h *EnakGameCustomerHandler) CompleteSession(c *gin.Context) {
|
||||
util.HandleResponse(c.Writer, c.Request, h.service.CompleteSession(c.Request.Context(), customerID, id, in), method)
|
||||
}
|
||||
|
||||
// ListVouchers is GET /customer/enakgame/vouchers.
|
||||
// ListVouchers is GET /customer/vouchers.
|
||||
func (h *EnakGameCustomerHandler) ListVouchers(c *gin.Context) {
|
||||
const method = "EnakGameCustomerHandler::ListVouchers"
|
||||
customerID, ok := customerIDFromGin(c, method)
|
||||
@@ -116,7 +116,7 @@ func (h *EnakGameCustomerHandler) ListVouchers(c *gin.Context) {
|
||||
util.HandleResponse(c.Writer, c.Request, h.service.ListVouchers(c.Request.Context(), customerID), method)
|
||||
}
|
||||
|
||||
// RedeemVoucher is POST /customer/enakgame/vouchers/:id/redeem. It requires the PIN
|
||||
// RedeemVoucher is POST /customer/vouchers/:id/redeem. It requires the PIN
|
||||
// and Idempotency-Key; the body holds the PIN, so it is never logged.
|
||||
func (h *EnakGameCustomerHandler) RedeemVoucher(c *gin.Context) {
|
||||
const method = "EnakGameCustomerHandler::RedeemVoucher"
|
||||
@@ -135,7 +135,7 @@ func (h *EnakGameCustomerHandler) RedeemVoucher(c *gin.Context) {
|
||||
util.HandleResponse(c.Writer, c.Request, h.service.RedeemVoucher(c.Request.Context(), customerID, id, &req, idempotencyKey(c), pinRequestInfo(c)), method)
|
||||
}
|
||||
|
||||
// ListRedemptions is GET /customer/enakgame/redemptions?page=&limit=.
|
||||
// ListRedemptions is GET /customer/vouchers/redemptions?page=&limit=.
|
||||
func (h *EnakGameCustomerHandler) ListRedemptions(c *gin.Context) {
|
||||
const method = "EnakGameCustomerHandler::ListRedemptions"
|
||||
customerID, ok := customerIDFromGin(c, method)
|
||||
|
||||
Reference in New Issue
Block a user