feat(ui): Fixed polling, added JQuery Ajax
Fixed Race Condition problems with polling, added JQuery
This commit is contained in:
@@ -172,8 +172,7 @@ class IngameController @Inject() (
|
||||
optSession.foreach(_.lock.unlock())
|
||||
if (result.isSuccess) {
|
||||
Ok(Json.obj(
|
||||
"status" -> "success",
|
||||
"redirectUrl" -> routes.IngameController.game(gameId).url
|
||||
"status" -> "success"
|
||||
))
|
||||
} else {
|
||||
val throwable = result.failed.get
|
||||
@@ -198,6 +197,11 @@ class IngameController @Inject() (
|
||||
"status" -> "failure",
|
||||
"errorMessage" -> throwable.getMessage
|
||||
))
|
||||
case _: NotInteractableException =>
|
||||
BadRequest(Json.obj(
|
||||
"status" -> "failure",
|
||||
"errorMessage" -> throwable.getMessage
|
||||
))
|
||||
case _ =>
|
||||
InternalServerError(Json.obj(
|
||||
"status" -> "failure",
|
||||
|
||||
Reference in New Issue
Block a user