Remove vm2 usage from script controllers

This commit is contained in:
Adria Navarro 2024-02-19 19:42:28 +01:00
parent 2cc6710162
commit 0b84957ad0
1 changed files with 2 additions and 2 deletions

View File

@ -1,9 +1,9 @@
import { Ctx } from "@budibase/types" import { Ctx } from "@budibase/types"
import { VM2 } from "../../jsRunner/vm" 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 VM2(context) const runner = new IsolatedVM(context)
const result = runner.execute(script) const result = runner.execute(script)
ctx.body = result ctx.body = result
} }