diff --git a/hasaki-gen-crud/template.go b/hasaki-gen-crud/template.go index 49e1101..0ae3e97 100644 --- a/hasaki-gen-crud/template.go +++ b/hasaki-gen-crud/template.go @@ -124,9 +124,11 @@ func (TempLowHead3A60 *Temp3A60) Delete() (err error) { // ----------------------------temp------------------------------------ -func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper) { +func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, authoritys ...func(ctx *hskgin.GinContextHelper)) { var authority = func(ctx *hskgin.GinContextHelper) { - //todo 权限控制 + } + if len(authoritys) > 0 { + authority = authoritys[0] } router.Any("/Prefix3A60/TempLowHead3A60/get", func(ctx *hskgin.GinContextHelper) { diff --git a/main.go b/main.go index 14ce9a6..3389c93 100644 --- a/main.go +++ b/main.go @@ -35,5 +35,6 @@ func (myTestr3 *MyTestr3) getXorm() *xorm.Engine { func main() { t := &MyTestr3{} + InitializationHttpCrudAdminMyTestr3() t.Data() }