@x-id "byProvider" @BasePath /api/v1 @Summary List routes by provider @Description List routes by provider @Tags route @Accept json @Produce json @Success 200 {object} RoutesByProvider @Failure 403 {object} apitypes.ErrorResponse @Failure 500 {object} apitypes.ErrorResponse @Router /r
(c *gin.Context)
| 24 | // @Failure 500 {object} apitypes.ErrorResponse |
| 25 | // @Router /route/by_provider [get] |
| 26 | func ByProvider(c *gin.Context) { |
| 27 | ep := entrypoint.FromCtx(c.Request.Context()) |
| 28 | if ep == nil { // impossible, but just in case |
| 29 | c.JSON(http.StatusInternalServerError, apitypes.Error("entrypoint not initialized")) |
| 30 | return |
| 31 | } |
| 32 | c.JSON(http.StatusOK, ep.RoutesByProvider()) |
| 33 | } |
nothing calls this directly
no test coverage detected