(c *gin.Context)
| 30 | store operatorStore |
| 31 | } |
| 32 | |
| 33 | // registerOperatorsAPI wires the Operators management endpoints. Every route is |
| 34 | // admin-only (RequireAdmin per-route, so the gate travels with the route and a |
| 35 | // rename can't silently downgrade it). Mutations also flow through the audited |
| 36 | // /api/v1 group, so operator changes are recorded automatically. |
| 37 | func registerOperatorsAPI(r *gin.RouterGroup, store operatorStore) { |
| 38 | h := &operatorsHandler{store: store} |
| 39 | r.GET("/operators", RequireAdmin(), h.listOperators) |
| 40 | r.POST("/operators", RequireAdmin(), h.upsertOperator) |
| 41 | r.DELETE("/operators/:email", RequireAdmin(), h.deleteOperator) |
| 42 | } |
no test coverage detected