From 27dc38094c4266015441cbbaf1d421e589378c0f Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Tue, 5 Sep 2023 19:45:04 +0800 Subject: [PATCH] grop path --- server/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index cd852ab..1f4ba3a 100644 --- a/server/server.go +++ b/server/server.go @@ -11,9 +11,12 @@ func initRoutge(engine *gin.Engine) { staff := new(controller.Staff) base := new(controller.Base) apiGroup := engine.Group("/api") + group := engine.Group("/") apiGroup.Use(base.Recovery) + group.Use(base.Recovery) apiGroup.Any("/qyweixin/approve", qyweixin.Approve) - apiGroup.GET("/staff/salary", staff.Salary) + group.Any("/qyweixin/approve", qyweixin.Approve) + group.GET("/staff/salary", staff.Salary) engine.LoadHTMLGlob("conf/template/*") }