1

Improve demo and error handling

This commit is contained in:
2018-05-05 10:05:23 +03:00
parent c2fda1ffaf
commit b51414e177
3 changed files with 49 additions and 5 deletions

View File

@@ -72,5 +72,17 @@ ratpack {
}
}
}
post('executeQuery') {
def transactionManager = get(TransactionManagerService)
parse(Form).then { Form form ->
def query = form.get('query')
transactionManager.execute {
it.query(query).complete()
} .then {
response.send(it.toString())
}
}
}
}
}