This commit is contained in:
Adria Navarro 2024-02-19 19:58:41 +01:00
parent 9f5d4811ba
commit 282a3ee3b9
1 changed files with 2 additions and 1 deletions

View File

@ -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
} }