public_host 4 years ago
parent
commit
0f9f698f53
  1. 6
      hasaki-gen-crud/template.go
  2. 1
      main.go

6
hasaki-gen-crud/template.go

@ -124,9 +124,11 @@ func (TempLowHead3A60 *Temp3A60) Delete() (err error) {
// ----------------------------temp------------------------------------ // ----------------------------temp------------------------------------
func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper) {
func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, authoritys ...func(ctx *hskgin.GinContextHelper)) {
var authority = 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) { router.Any("/Prefix3A60/TempLowHead3A60/get", func(ctx *hskgin.GinContextHelper) {

1
main.go

@ -35,5 +35,6 @@ func (myTestr3 *MyTestr3) getXorm() *xorm.Engine {
func main() { func main() {
t := &MyTestr3{} t := &MyTestr3{}
InitializationHttpCrudAdminMyTestr3()
t.Data() t.Data()
} }
Loading…
Cancel
Save