This commit is contained in:
EgorGud
2026-10-16 13:26:28 +03:00
parent 99e5bf382a
commit 77bee53cda
@@ -31,6 +31,16 @@ app.MapGet("/pokemons/{id}", (int id) =>
return Results.Ok(pokemon);
}
});
app.MapGet("/pokemons/type", (string type) =>
{
var filterpokemon = pokemons.FirstOrDefault(p => p.Type == type);
if (filterpokemon == null)
{
return Results.NotFound();
}
return null;
});
List<string> Validate(PokemonInput input)
{