From 43dd214a7e271f65908fb6623d430c1429c7ae23 Mon Sep 17 00:00:00 2001 From: linwenxiang <991154416@qq.com> Date: Wed, 23 Sep 2020 00:36:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E7=89=88=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/v2/routercheckrole.go.template | 2 +- template/v2/routernocheckrole.go.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template/v2/routercheckrole.go.template b/template/v2/routercheckrole.go.template index b853e346..88451bd2 100644 --- a/template/v2/routercheckrole.go.template +++ b/template/v2/routercheckrole.go.template @@ -23,7 +23,7 @@ func register{{.ClassName}}Router(v1 *gin.RouterGroup, authMiddleware *jwt.GinJW list := make([]models.{{.ClassName}}, 0) return &list })) - r.GET("/:id", actions.PermissionAction(), actions.ViewAction(new(dto.{{.ClassName}}ById))) + r.GET("/:id", actions.PermissionAction(), actions.ViewAction(new(dto.{{.ClassName}}ById), nil)) r.POST("", actions.CreateAction(new(dto.{{.ClassName}}Control))) r.PUT("/:id", actions.PermissionAction(), actions.UpdateAction(new(dto.{{.ClassName}}Control))) r.DELETE("", actions.PermissionAction(), actions.DeleteAction(new(dto.{{.ClassName}}ById))) diff --git a/template/v2/routernocheckrole.go.template b/template/v2/routernocheckrole.go.template index 39de40c9..c647266e 100644 --- a/template/v2/routernocheckrole.go.template +++ b/template/v2/routernocheckrole.go.template @@ -22,7 +22,7 @@ func register{{.ClassName}}Router(v1 *gin.RouterGroup) { list := make([]models.{{.ClassName}}, 0) return &list })) - r.GET("/:id", actions.ViewAction(new(dto.{{.ClassName}}ById))) + r.GET("/:id", actions.ViewAction(new(dto.{{.ClassName}}ById), nil)) r.POST("", actions.CreateAction(new(dto.{{.ClassName}}Control))) r.PUT("/:id", actions.UpdateAction(new(dto.{{.ClassName}}Control))) r.DELETE("", actions.DeleteAction(new(dto.{{.ClassName}}ById)))