Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pokemon-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import fetch from 'node-fetch';

const BASE_API = 'http://pokeapi.co';

export function pokemon({id = 1} = {}){
return fetch(`${BASE_API}/api/v1/pokemon/${id}`)
.then((response) => response.json());
export async function pokemon({id = 1} = {}){
var response = await fetch(`${BASE_API}/api/v1/pokemon/${id}`);
return response.json();
};

export async function descriptions({pokemon = false} = {}){
Expand Down