2021-10-13 06:45:13 +13:00
|
|
|
const ScriptRunner = require("../../utilities/scriptRunner")
|
2021-03-26 00:17:04 +13:00
|
|
|
|
2021-05-04 20:55:14 +12:00
|
|
|
exports.execute = async function (ctx) {
|
2021-10-13 06:45:13 +13:00
|
|
|
const { script, context } = ctx.request.body
|
|
|
|
const runner = new ScriptRunner(script, context)
|
|
|
|
ctx.body = runner.execute()
|
2021-05-12 04:49:26 +12:00
|
|
|
}
|
|
|
|
|
2021-05-12 04:50:26 +12:00
|
|
|
exports.save = async function (ctx) {
|
2021-05-12 04:49:26 +12:00
|
|
|
ctx.throw(501, "Not currently implemented")
|
2021-03-26 00:17:04 +13:00
|
|
|
}
|