This commit is contained in:
2022-11-11 18:42:27 -06:00
parent b89760af8e
commit 79b70d6fa5
13 changed files with 656 additions and 364 deletions

View File

@@ -10,6 +10,6 @@ public interface IShogiApi
Task<ReadSessionsPlayerCountResponse?> GetSessionsPlayerCount();
Task<CreateTokenResponse?> GetToken();
Task GuestLogout();
Task PostMove(string sessionName, Move move);
Task PostMove(string sessionName, MovePieceCommand move);
Task<HttpStatusCode> PostSession(string name, bool isPrivate);
}

View File

@@ -63,9 +63,9 @@ namespace Shogi.UI.Pages.Home.Api
return response;
}
public async Task PostMove(string sessionName, Contracts.Types.Move move)
public async Task PostMove(string sessionName, MovePieceCommand command)
{
await this.HttpClient.PostAsJsonAsync($"Sessions{sessionName}/Move", new MovePieceCommand { Move = move });
await this.HttpClient.PostAsJsonAsync($"Sessions{sessionName}/Move", command);
}
public async Task<HttpStatusCode> PostSession(string name, bool isPrivate)