wireup script execution
This commit is contained in:
@@ -57,7 +57,8 @@ object Entities {
|
||||
val name = ctx.pathParam("name")
|
||||
val params = ctx.bodyAsClass<Map<String, Any>>()
|
||||
ctx.json(
|
||||
Scripting.execute(name, params)
|
||||
Scripting.
|
||||
execute(name, "execute", params, logger)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -202,6 +203,12 @@ object Entities {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!setupEntity.preSaveScript.isNullOrEmpty()) {
|
||||
val ok = Scripting.preSave(setupEntity.preSaveScript!!, "preSave", this, logger) as Boolean
|
||||
if (!ok) {
|
||||
throw BadRequestResponse("PreSave Failed")
|
||||
}
|
||||
}
|
||||
|
||||
if (setupEntity.approvalLevels > 0) {
|
||||
|
||||
@@ -210,7 +217,8 @@ object Entities {
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
private fun isValidDate(f: String) = try {
|
||||
|
||||
Reference in New Issue
Block a user