Fix - Cleaning up the input pokemonName

This commit is contained in:
Eugene ;) 2020-11-22 19:00:06 +01:00
parent ccf610b49d
commit 2ad60c5257

View File

@ -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