fix(ucca): Route-Konflikt :id vs :assessmentId — TOM-Controls Pfad geaendert
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 33s
CI / test-python-backend-compliance (push) Successful in 34s
CI / test-python-document-crawler (push) Successful in 22s
CI / test-python-dsms-gateway (push) Successful in 17s

GET /obligations/:id/tom-controls → GET /obligations/tom-controls/for-obligation/:obligationId
Gin erlaubt keine unterschiedlichen Param-Namen auf demselben Pfad-Level.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-05 15:03:48 +01:00
parent 38e278ee3c
commit f3ccfe5dcd
2 changed files with 3 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ export default function TOMControlPanel({ obligationId, onClose }: TOMControlPan
setLoading(true) setLoading(true)
setError(null) setError(null)
try { try {
const res = await fetch(`${UCCA_API}/${obligationId}/tom-controls`) const res = await fetch(`${UCCA_API}/tom-controls/for-obligation/${obligationId}`)
if (!res.ok) throw new Error(`HTTP ${res.status}`) if (!res.ok) throw new Error(`HTTP ${res.status}`)
const data = await res.json() const data = await res.json()
setControls(data.controls || []) setControls(data.controls || [])

View File

@@ -99,7 +99,7 @@ func (h *ObligationsHandlers) RegisterRoutes(r *gin.RouterGroup) {
obligations.POST("/assess-from-scope", h.AssessFromScope) obligations.POST("/assess-from-scope", h.AssessFromScope)
// v2: TOM Control endpoints // v2: TOM Control endpoints
obligations.GET("/:id/tom-controls", h.GetTOMControlsForObligation) obligations.GET("/tom-controls/for-obligation/:obligationId", h.GetTOMControlsForObligation)
obligations.POST("/gap-analysis", h.GapAnalysis) obligations.POST("/gap-analysis", h.GapAnalysis)
obligations.GET("/tom-controls/:controlId/obligations", h.GetObligationsForControl) obligations.GET("/tom-controls/:controlId/obligations", h.GetObligationsForControl)
} }
@@ -508,7 +508,7 @@ func (h *ObligationsHandlers) AssessFromScope(c *gin.Context) {
// GetTOMControlsForObligation returns TOM controls linked to an obligation // GetTOMControlsForObligation returns TOM controls linked to an obligation
// GET /sdk/v1/ucca/obligations/:id/tom-controls // GET /sdk/v1/ucca/obligations/:id/tom-controls
func (h *ObligationsHandlers) GetTOMControlsForObligation(c *gin.Context) { func (h *ObligationsHandlers) GetTOMControlsForObligation(c *gin.Context) {
obligationID := c.Param("id") obligationID := c.Param("obligationId")
if h.tomMapper == nil { if h.tomMapper == nil {
c.JSON(http.StatusNotImplemented, gin.H{"error": "TOM mapping not available"}) c.JSON(http.StatusNotImplemented, gin.H{"error": "TOM mapping not available"})