1
0
Fork 0
mirror of synced 2024-07-04 22:11:23 +12:00

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

View file

@ -1,9 +1,9 @@
import { Ctx } from "@budibase/types"
import { VM2 } from "../../jsRunner/vm"
import { IsolatedVM } from "../../jsRunner/vm"
export async function execute(ctx: Ctx) {
const { script, context } = ctx.request.body
const runner = new VM2(context)
const runner = new IsolatedVM(context)
const result = runner.execute(script)
ctx.body = result
}