payment-history: drop /payments/{id}/gateway in favour of /{id}/gateway
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user