diff --git a/engine/engine.go b/engine/engine.go index da1299b..8aa33f1 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -204,5 +204,5 @@ func (this *Engine[T]) Execute(data T) error { } func New[T any](table string, relations ...string) *Engine[T] { - return &Engine[T]{code: table, relations: relations} + return &Engine[T]{code: table, relations: relations, g: support.NewGlobalParam("", nil)} } diff --git a/engine/engine_param.go b/engine/engine_param.go index e0c078b..8b174a6 100644 --- a/engine/engine_param.go +++ b/engine/engine_param.go @@ -11,5 +11,5 @@ func (this EngineParam) GetParam(k string) contracts.GlobalParams { } func (this EngineParam) GetGlobalParamsUser() contracts.User { - return nil + return this.data.User() }