mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
remove swagger
This commit is contained in:
+15
-15
@@ -31,21 +31,21 @@ func apiMetricsGet() gin.HandlerFunc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func redirectSwagger(c *gin.Context) {
|
// func redirectSwagger(c *gin.Context) {
|
||||||
if c.Request.URL.Path == "/docs/index.html" {
|
// if c.Request.URL.Path == "/docs/index.html" {
|
||||||
c.Redirect(http.StatusMovedPermanently, "/docs.html")
|
// c.Redirect(http.StatusMovedPermanently, "/docs.html")
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if c.Request.URL.Path == "/docs/" {
|
// if c.Request.URL.Path == "/docs/" {
|
||||||
c.Redirect(http.StatusMovedPermanently, "/docs.html")
|
// c.Redirect(http.StatusMovedPermanently, "/docs.html")
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if c.Request.URL.Path == "/docs" {
|
// if c.Request.URL.Path == "/docs" {
|
||||||
c.Redirect(http.StatusMovedPermanently, "/docs.html")
|
// c.Redirect(http.StatusMovedPermanently, "/docs.html")
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
c.Next()
|
// c.Next()
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Router returns prebuilt with routes http.Handler
|
// Router returns prebuilt with routes http.Handler
|
||||||
func Router(c *ctx.AptlyContext) http.Handler {
|
func Router(c *ctx.AptlyContext) http.Handler {
|
||||||
|
|||||||
Reference in New Issue
Block a user