Move from the hand.

This commit is contained in:
2023-02-01 22:49:28 -06:00
parent e2eff4f8b5
commit 3bf9aa3ee3
29 changed files with 248 additions and 133 deletions

View File

@@ -88,6 +88,9 @@ public class SessionsController : ControllerBase
var session = await sessionRepository.ReadSession(name);
if (session == null) return this.NotFound();
var players = await queryRespository.GetUsersForSession(session.Name);
if (players == null) return this.NotFound();
return new ReadSessionResponse
{
Session = new Session
@@ -100,8 +103,8 @@ public class SessionsController : ControllerBase
PlayerInCheck = session.Board.BoardState.InCheck?.ToContract(),
WhoseTurn = session.Board.BoardState.WhoseTurn.ToContract()
},
Player1 = session.Player1,
Player2 = session.Player2,
Player1 = players.Value.Player1,
Player2 = players.Value.Player2,
SessionName = session.Name
}
};