From 3db56034f8d238d4d93235e7e426ccf38745fa26 Mon Sep 17 00:00:00 2001 From: tin33392js Date: Mon, 28 Nov 2022 09:35:47 +0700 Subject: [PATCH] Optimize request's speed + size with different endpoint --- pokedex/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokedex/script.js b/pokedex/script.js index 6b824d9..683f01f 100644 --- a/pokedex/script.js +++ b/pokedex/script.js @@ -26,7 +26,7 @@ const fetchPokemons = async () => { } const getPokemon = async (id) => { - const url = `https://pokeapi.co/api/v2/pokemon/${id}` + const url = `https://pokeapi.co/api/v2/pokemon-form/${id}` const res = await fetch(url) const data = await res.json() createPokemonCard(data)