This commit is contained in:
2022-11-10 19:25:55 -06:00
parent f7f752b694
commit 02b83efc88
9 changed files with 64 additions and 12 deletions

View File

@@ -39,7 +39,7 @@ public class SessionsController : ControllerBase
public async Task<IActionResult> CreateSession([FromBody] CreateSessionCommand request)
{
var userId = User.GetShogiUserId();
var session = new Domain.Aggregates.Session(request.Name, userId);
var session = new Domain.Session(request.Name, userId);
try
{
await sessionRepository.CreateSession(session);
@@ -126,7 +126,7 @@ public class SessionsController : ControllerBase
}
else
{
session.Board.Move(command.From!, command.To, command.IsPromotion);
session.Board.Move(command.From!, command.To, command.IsPromotion!.Value);
}
}
catch (InvalidOperationException)