Commit e1b7b845 by 彭芳

minor

parent acd18b50
...@@ -33,7 +33,7 @@ type Web struct { ...@@ -33,7 +33,7 @@ type Web struct {
func (p *Web) RouterInit(engine *gin.Engine) { func (p *Web) RouterInit(engine *gin.Engine) {
engine.Use(p.Common.SetRequestId, p.Common.PassMethods) engine.Use(p.Common.SetRequestId, p.Common.PassMethods)
engine.NoRoute(func(c *gin.Context) { engine.NoRoute(func(c *gin.Context) {
c.JSON(http.StatusNotFound, gin.H{"code": "404", "message": "PageNo not found"}) c.JSON(http.StatusNotFound, gin.H{"code": "404", "message": "Page not found"})
}) })
if gin.Mode() != gin.ReleaseMode { if gin.Mode() != gin.ReleaseMode {
engine.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) engine.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment