move swagger docs

This commit is contained in:
Daniel 2020-01-26 13:10:34 +01:00
parent 6953bd744b
commit 2eb425199e

View file

@ -45,7 +45,6 @@ func (s *Server) AddChannel(channel string) {
}
func (s *Server) Init() {
e := echo.New()
e.HideBanner = true
@ -71,9 +70,9 @@ func (s *Server) Init() {
e.GET("/bundle.js", echo.WrapHandler(assetHandler))
e.GET("/docs", func(c echo.Context) error {
return c.Redirect(http.StatusMovedPermanently, "/index.html")
return c.Redirect(http.StatusMovedPermanently, "/swagger/index.html")
})
e.GET("/*", echoSwagger.WrapHandler)
e.GET("/swagger/*", echoSwagger.WrapHandler)
e.GET("/channels", s.getAllChannels)
e.GET("/channel/:channel/user/:username/range", s.getUserLogsRangeByName)