Browse Source

Fix - Cleaning up the input pokemonName

master
Eugene ;) 2 years ago
parent
commit
2ad60c5257
  1. 1
      Pokespearean/Services/PokemonService.cs

1
Pokespearean/Services/PokemonService.cs

@ -20,6 +20,7 @@ namespace Pokespearean.Services
var result = new WebResult();
try
{
pokemonName = pokemonName.ToLower().Trim();
var pokemonSpecies = await pokeApiClient.GetResourceAsync<PokemonSpecies>(pokemonName);
var hasRubyVersion = pokemonSpecies.FlavorTextEntries.Where(fte => fte.Language.Name == "en" && fte.Version.Name == "ruby").Any();
result.Data = pokemonSpecies.FlavorTextEntries

Loading…
Cancel
Save