From abcdf880fdecbbab1779802b2c829c307848d5b8 Mon Sep 17 00:00:00 2001 From: wenjianzhang Date: Wed, 12 May 2021 18:46:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor=F0=9F=8E=A8=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=A8=A1=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/v4/no_actions/router_check_role.go.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/v4/no_actions/router_check_role.go.template b/template/v4/no_actions/router_check_role.go.template index 0aeb43e..b045297 100644 --- a/template/v4/no_actions/router_check_role.go.template +++ b/template/v4/no_actions/router_check_role.go.template @@ -4,7 +4,7 @@ import ( "github.com/gin-gonic/gin" jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth" - "go-admin/app/{{.PackageName}}/apis/{{.ModuleName}}" + "go-admin/app/{{.PackageName}}/apis" "go-admin/common/middleware" ) @@ -14,7 +14,7 @@ func init() { // register{{.ClassName}}Router func register{{.ClassName}}Router(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) { - api := &{{.ModuleName}}.{{.ClassName}}{} + api := apis.{{.ClassName}}{} r := v1.Group("/{{.ModuleName}}").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole()) { r.GET("", api.Get{{.ClassName}}List)