(ctx context.Context)
| 34 | } |
| 35 | |
| 36 | func (fn *jsInvocation) Run(ctx context.Context) (any, error) { |
| 37 | syncCtx, err := db.MakeUserCtx(fn.db.User(), base.DefaultScope, base.DefaultCollection) |
| 38 | if err != nil { |
| 39 | return nil, err |
| 40 | } |
| 41 | return fn.call(ctx, syncCtx, fn.args) |
| 42 | } |
| 43 | |
| 44 | func (fn *jsInvocation) call(ctx context.Context, jsArgs ...any) (any, error) { |
| 45 | return fn.compiled.WithTask(ctx, func(task sgbucket.JSServerTask) (result any, err error) { |
nothing calls this directly
no test coverage detected