Upgrade to .net 5
Address breaking changes from Shogi.API nuget
This commit is contained in:
@@ -30,9 +30,9 @@ namespace Websockets.Managers.ClientActionHandlers
|
||||
{
|
||||
logger.LogInformation("Socket Request \n{0}\n", new[] { json });
|
||||
var request = JsonConvert.DeserializeObject<CreateGameRequest>(json);
|
||||
var postGameResponse = await repository.PostGame(new PostGame
|
||||
var postSessionResponse = await repository.PostSession(new PostSession
|
||||
{
|
||||
GameName = request.GameName,
|
||||
SessionName = request.GameName,
|
||||
PlayerName = userName, // TODO : Investigate if needed by UI
|
||||
IsPrivate = request.IsPrivate
|
||||
});
|
||||
@@ -42,12 +42,12 @@ namespace Websockets.Managers.ClientActionHandlers
|
||||
PlayerName = userName,
|
||||
Game = new Game
|
||||
{
|
||||
GameName = postGameResponse.GameName,
|
||||
GameName = postSessionResponse.SessionName,
|
||||
Players = new string[] { userName }
|
||||
}
|
||||
};
|
||||
|
||||
if (string.IsNullOrWhiteSpace(postGameResponse.GameName))
|
||||
if (string.IsNullOrWhiteSpace(postSessionResponse.SessionName))
|
||||
{
|
||||
response.Error = "Game already exists.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user