Skip to content

Commit

Permalink
Merge pull request #141 from mongodb-developer/main
Browse files Browse the repository at this point in the history
Fix for #137
  • Loading branch information
snarvaez authored May 5, 2024
2 parents eaae4c5 + 32831df commit aa01cb3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions website/Pages/EventRegister.razor
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
Register
</button>
<button type="button" class="btn btn-block center" style="background-color:#00ed64"
@onclick="CreatePlayer">
@onclick="LoginPlayer">
Login
</button>
</div>
Expand Down Expand Up @@ -235,19 +235,18 @@
{
if (string.IsNullOrEmpty(_player.Name))
{
_errorMessage = "[Enter your name!]";
_errorMessage = "[Enter your Nickname!]";
return;
}

_errorMessage = "";

var args = new Dictionary<string, string>
{
{ "Name", _player.Name }
{ "name", _player.Name }
};

string urlWithQuery = UrlHelper.BuildUrlWithQuery(Constants.RestServiceEndpointPlayers, args);

var players = await _restClient.GetJsonAsync<List<Player>>(urlWithQuery);
var filteredPlayers = players!.FindAll(p => p.Name!.Equals(_player.Name));
var existingPlayer = filteredPlayers.FirstOrDefault();
Expand Down

0 comments on commit aa01cb3

Please sign in to comment.