|
@@ -202,7 +202,7 @@ type CustomCondition struct {
|
|
|
OrderBy string
|
|
|
}
|
|
|
|
|
|
-type FormCustomConditionFunc func(c *api.Context, params request.Params, e entity.Entity) (*CustomCondition, error)
|
|
|
+type FormCustomConditionFunc func(c *api.Context, params request.Params, e entity.Entity, i *infrastructure.Infrastructure) (*CustomCondition, error)
|
|
|
|
|
|
func Query[O any](tableName string, orderBy string, callbacks *QueryCallbacks[O], conditionFieldCallback ConditionFieldCallback, formCustomConditionFunc FormCustomConditionFunc) binding.ServiceFunc[response.InfosData[O]] {
|
|
|
return func(c *api.Context, params request.Params, objects []domain.Object, i *infrastructure.Infrastructure) (response.InfosData[O], error) {
|
|
@@ -256,7 +256,7 @@ func Query[O any](tableName string, orderBy string, callbacks *QueryCallbacks[O]
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- customCondition, err := formCustomConditionFunc(c, params, e)
|
|
|
+ customCondition, err := formCustomConditionFunc(c, params, e, i)
|
|
|
if err != nil {
|
|
|
return errResponse, err
|
|
|
}
|