payment-history: drop /payments/{id}/gateway in favour of /{id}/gateway
Some checks failed
CI/CD / Deploy binary to server (push) Has been cancelled
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled

Both routes served the same handler and took an order ID, while
/payments/{id} takes a payment ID - so the /payments/ one read as
per-payment and showed up twice in Swagger. /payment-history/{id}/gateway
is the one to use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 23:30:11 +05:00
parent d7e5d1f989
commit 570d4c6d20
5 changed files with 2 additions and 206 deletions

View File

@@ -35,10 +35,10 @@ func gatewayRequest(t *testing.T, repo Repository, path string) *httptest.Respon
router.Use(func(c *gin.Context) {
c.Set("rbacPrincipal", &rbac.Principal{UserID: 1, Scope: rbac.ScopeAll})
})
router.GET("/payment-history/payments/:id/gateway", h.gateway)
router.GET("/payment-history/:id/gateway", h.gateway)
rec := httptest.NewRecorder()
router.ServeHTTP(rec, httptest.NewRequest(http.MethodGet, "/payment-history/payments/"+path, nil))
router.ServeHTTP(rec, httptest.NewRequest(http.MethodGet, "/payment-history/"+path, nil))
return rec
}