Fix - Cleaning up the input pokemonName
This commit is contained in:
parent
ccf610b49d
commit
2ad60c5257
@ -20,6 +20,7 @@ namespace Pokespearean.Services
|
|||||||
var result = new WebResult();
|
var result = new WebResult();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
pokemonName = pokemonName.ToLower().Trim();
|
||||||
var pokemonSpecies = await pokeApiClient.GetResourceAsync<PokemonSpecies>(pokemonName);
|
var pokemonSpecies = await pokeApiClient.GetResourceAsync<PokemonSpecies>(pokemonName);
|
||||||
var hasRubyVersion = pokemonSpecies.FlavorTextEntries.Where(fte => fte.Language.Name == "en" && fte.Version.Name == "ruby").Any();
|
var hasRubyVersion = pokemonSpecies.FlavorTextEntries.Where(fte => fte.Language.Name == "en" && fte.Version.Name == "ruby").Any();
|
||||||
result.Data = pokemonSpecies.FlavorTextEntries
|
result.Data = pokemonSpecies.FlavorTextEntries
|
||||||
|
Loading…
Reference in New Issue
Block a user