diff --git a/hasaki-gen-crud/template.go b/hasaki-gen-crud/template.go index 2b7cf21..355e973 100644 --- a/hasaki-gen-crud/template.go +++ b/hasaki-gen-crud/template.go @@ -145,18 +145,18 @@ func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, a } router.Any("/Prefix3A60/TempLowHead3A60/get", func(ctx *hskgin.GinContextHelper) { - req := Temp3A60{} - ctx.Bind(&req) - authority(ctx, &req) + req := &Temp3A60{} + ctx.Bind(req) + authority(ctx, req) err := req.Load() ctx.CheckErrDisplayByError(err) ctx.DisplayByData(req) }) router.Any("/Prefix3A60/TempLowHead3A60/save", func(ctx *hskgin.GinContextHelper) { - req := Temp3A60{} + req := &Temp3A60{} ctx.Bind(&req) - authority(ctx, &req) + authority(ctx, req) err := req.Save() ctx.CheckErrDisplayByError(err) err = req.Load() @@ -165,17 +165,17 @@ func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, a }) router.Any("/Prefix3A60/TempLowHead3A60/data", func(ctx *hskgin.GinContextHelper) { - req := Temp3A60{} + req := &Temp3A60{} ctx.Bind(&req) - authority(ctx, &req) + authority(ctx, req) data := req.Data() ctx.DisplayByData(data) }) router.Any("/Prefix3A60/TempLowHead3A60/list", func(ctx *hskgin.GinContextHelper) { - req := Temp3A60{} + req := &Temp3A60{} ctx.Bind(&req) - authority(ctx, &req) + authority(ctx, req) page := ctx.ParamRequired2Page(true) data, count := req.PageData(page, 10) ctx.DisplayByPage(data, count)