From 078667fc3f0691677a674305b3a07d67bc65e27d Mon Sep 17 00:00:00 2001 From: Janis Date: Sun, 7 Dec 2025 19:12:28 +0100 Subject: [PATCH] feat: BAC-27 Implemented endpoint which returns information about the current state --- knockoutwhistweb/app/controllers/StatusController.scala | 8 +++----- knockoutwhistweb/conf/routes | 6 +++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/knockoutwhistweb/app/controllers/StatusController.scala b/knockoutwhistweb/app/controllers/StatusController.scala index e2980da..72daedb 100644 --- a/knockoutwhistweb/app/controllers/StatusController.scala +++ b/knockoutwhistweb/app/controllers/StatusController.scala @@ -1,15 +1,13 @@ package controllers -import auth.{AuthAction, AuthenticatedRequest} -import de.knockoutwhist.control.GameState.{FinishedMatch, InGame, Lobby, MainMenu, SelectTrump, TieBreak} -import de.knockoutwhist.player.AbstractPlayer +import auth.AuthAction import logic.PodManager import logic.game.GameLobby import logic.user.SessionManager import model.users.User import play.api.libs.json.{JsValue, Json} -import play.api.mvc.{Action, *} -import util.{WebUIUtils, WebsocketEventMapper} +import play.api.mvc.* +import util.WebsocketEventMapper import javax.inject.Inject diff --git a/knockoutwhistweb/conf/routes b/knockoutwhistweb/conf/routes index ac9c094..c5dfd08 100644 --- a/knockoutwhistweb/conf/routes +++ b/knockoutwhistweb/conf/routes @@ -27,4 +27,8 @@ GET /logout controllers.UserController.logout() GET /game/:id controllers.IngameController.game(id: String) # Websocket -GET /websocket controllers.WebsocketController.socket() \ No newline at end of file +GET /websocket controllers.WebsocketController.socket() + +# Status +GET /status controllers.StatusController.requestStatus() +GET /status/:gameId controllers.StatusController.game(gameId: String) \ No newline at end of file