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