Manager: redirect web root to Swagger UI

Temporarily redirect the index page to the Swagger UI, so that at least
you can see something other than a "404 Not Found" error.
This commit is contained in:
Sybren A. Stüvel 2022-03-01 20:49:11 +01:00
parent ddd0c7602b
commit 954babd914

View File

@ -118,6 +118,12 @@ func buildWebService(flamenco api.ServerInterface, persist api_impl.PersistenceS
return c.JSON(http.StatusOK, swagger)
})
// Temporarily redirect the index page to the Swagger UI, so that at least you
// can see something.
e.GET("/", func(c echo.Context) error {
return c.Redirect(http.StatusTemporaryRedirect, "/api/swagger-ui/")
})
// Log available routes
routeLogger := log.Level(zerolog.DebugLevel)
routeLogger.Debug().Msg("available routes:")