Compare commits

...

4 Commits

Author SHA1 Message Date
TeamCity
13038b0cb9 ci: bump version to v4.14.0 2025-12-11 06:13:24 +00:00
b17aae5795 feat: FRO-31 Small backend changes (#108)
Force pushing Janis changes

Co-authored-by: Janis <janis.e.20@gmx.de>
Co-authored-by: Janis <janis-e@gmx.de>
Reviewed-on: #108
Co-authored-by: lq64 <lq@blackhole.local>
Co-committed-by: lq64 <lq@blackhole.local>
2025-12-11 07:10:24 +01:00
TeamCity
421f769cb6 ci: bump version to v4.13.0 2025-12-10 14:19:44 +00:00
bd7a055a09 feat(api): FRO-14 Create Game (#107)
Added functionality to create Game so that it creates a game in the Backend

Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #107
Reviewed-by: Janis <janis-e@gmx.de>
Co-authored-by: lq64 <lq@blackhole.local>
Co-committed-by: lq64 <lq@blackhole.local>
2025-12-10 15:16:53 +01:00
5 changed files with 17 additions and 7 deletions

View File

@@ -239,3 +239,13 @@
### Features
* FRO-20 Create scoreboard component ([#106](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/issues/106)) ([2a29ca8](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/2a29ca8cdd3ef55f6f66f00b5e7727e1b1af1458))
## (2025-12-10)
### Features
* **api:** FRO-14 Create Game ([#107](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/issues/107)) ([bd7a055](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/bd7a055a0944a1c5219f21bb080bf658229f49e9))
## (2025-12-11)
### Features
* FRO-31 Small backend changes ([#108](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/issues/108)) ([b17aae5](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/b17aae5795b35ce3805db87c9bf741a5a96cd5ac))

View File

@@ -44,8 +44,7 @@ class MainMenuController @Inject()(
)
Ok(Json.obj(
"status" -> "success",
"redirectUrl" -> routes.IngameController.game(gameLobby.id).url,
"content" -> IngameController.returnInnerHTML(gameLobby, gameLobby.logic.getCurrentState, request.user).toString
"gameId" -> gameLobby.id,
))
} else {
BadRequest(Json.obj(

View File

@@ -34,7 +34,7 @@ class StatusController @Inject()(
Json.obj(
"status" -> "authenticated",
"username" -> user.name,
"inGame" -> "false"
"inGame" -> false
)
)
} else {
@@ -43,7 +43,7 @@ class StatusController @Inject()(
Json.obj(
"status" -> "authenticated",
"username" -> user.name,
"inGame" -> "true",
"inGame" -> true,
"gameId" -> game.id
)
)
@@ -80,7 +80,7 @@ class StatusController @Inject()(
}}
private def getUserFromSession(request: RequestHeader): Option[User] = {
val session = request.cookies.get("sessionId")
val session = request.cookies.get("accessToken")
if (session.isDefined)
return sessionManager.getUserBySession(session.get.value)
None

View File

@@ -57,7 +57,8 @@ object WebsocketEventMapper {
Json.obj(
"id" -> ("request-" + java.util.UUID.randomUUID().toString),
"event" -> obj.id,
"state" -> stateToJson(session),
"state" -> session.gameLobby.getLogic.getCurrentState.toString,
"stateData" -> stateToJson(session),
"data" -> data
)
}

View File

@@ -1,3 +1,3 @@
MAJOR=4
MINOR=12
MINOR=14
PATCH=0