This commit is contained in:
Adria Navarro 2024-02-19 20:12:46 +01:00
parent 93fd5a2da5
commit 2042a95805
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import { IsolatedVM } from "../../jsRunner/vm"
export async function execute(ctx: Ctx) {
const { script, context } = ctx.request.body
const runner = new IsolatedVM(context)
const runner = new IsolatedVM().withContext(context)
const result = runner.execute(`(function(){\n${script}\n})();`)
ctx.body = result