@@ -2,20 +2,21 @@ package action
22
33import (
44 "context"
5+ "strings"
6+
57 "github.com/glennliao/apijson-go/config"
68 "github.com/glennliao/apijson-go/consts"
79 "github.com/glennliao/apijson-go/model"
810 "github.com/gogf/gf/v2/database/gdb"
911 "github.com/gogf/gf/v2/errors/gerror"
1012 "github.com/gogf/gf/v2/frame/g"
1113 "github.com/gogf/gf/v2/util/gconv"
12- "strings"
1314)
1415
1516// Action 非get查询的request表中的请求
1617type Action struct {
1718 ctx context.Context
18- tagRequest * config.Request
19+ tagRequest * config.RequestConfig
1920 method string
2021
2122 req model.Map
@@ -30,7 +31,7 @@ type Action struct {
3031 // 关闭 request 验证开关, 默认否
3132 NoRequestVerify bool
3233
33- //Access *config.Access
34+ // Access *config.Access
3435
3536 // dbFieldStyle 数据库字段命名风格 请求传递到数据库中
3637 DbFieldStyle config.FieldStyle
@@ -75,7 +76,7 @@ func (a *Action) parse() error {
7576 }
7677 structure , ok := structures [key ]
7778 if ! ok {
78- if structure , ok = structures [structuresKey ]; ! ok { //User[]可读取User或者User[]
79+ if structure , ok = structures [structuresKey ]; ! ok { // User[]可读取User或者User[]
7980 return gerror .New ("structure错误: 400, 缺少" + key )
8081 }
8182 }
@@ -158,7 +159,7 @@ func (a *Action) Result() (model.Map, error) {
158159 return ret , err
159160}
160161
161- func checkTag (req model.Map , method string , requestCfg * config.ActionConfig ) (* config.Request , error ) {
162+ func checkTag (req model.Map , method string , requestCfg * config.ActionConfig ) (* config.RequestConfig , error ) {
162163 _tag , ok := req ["tag" ]
163164 if ! ok {
164165 return nil , gerror .New ("tag 缺失" )
0 commit comments