mirror of
https://github.com/smyalygames/checklist-tester.git
synced 2025-11-30 01:39:38 +01:00
feat(connector): change VDMJ to use interpreter
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
package io.anthonyberg.connector.routes
|
||||
|
||||
import io.anthonyberg.connector.shared.vdmj.vdmjExecute
|
||||
import io.anthonyberg.connector.shared.vdmj.VDMJ
|
||||
import io.ktor.http.*
|
||||
import io.ktor.server.application.*
|
||||
import io.ktor.server.response.*
|
||||
import io.ktor.server.routing.*
|
||||
|
||||
fun Route.vdmjRouting() {
|
||||
val vdmj = VDMJ()
|
||||
|
||||
route("/vdmj") {
|
||||
get("{exp?}") {
|
||||
val exp = call.parameters["exp"] ?: return@get call.respondText(
|
||||
@@ -15,7 +17,7 @@ fun Route.vdmjRouting() {
|
||||
)
|
||||
|
||||
// TODO output is empty string after first request
|
||||
val result = vdmjExecute(exp)
|
||||
val result = vdmj.run(exp)
|
||||
|
||||
call.respond(result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user