Fix test
This commit is contained in:
parent
9f5d4811ba
commit
282a3ee3b9
|
@ -4,7 +4,8 @@ import { IsolatedVM } from "../../jsRunner/vm"
|
||||||
export async function execute(ctx: Ctx) {
|
export async function execute(ctx: Ctx) {
|
||||||
const { script, context } = ctx.request.body
|
const { script, context } = ctx.request.body
|
||||||
const runner = new IsolatedVM(context)
|
const runner = new IsolatedVM(context)
|
||||||
const result = runner.execute(script)
|
|
||||||
|
const result = runner.execute(`(function(){\n${script}\n})();`)
|
||||||
ctx.body = result
|
ctx.body = result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue