Make use of loadJson
inside loadGithubUser
This commit is contained in:
parent
ef8d576821
commit
12d79680e8
1 changed files with 1 additions and 2 deletions
|
@ -332,8 +332,7 @@ function loadJson(url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadGithubUser(name) {
|
function loadGithubUser(name) {
|
||||||
return fetch(`https://api.github.com/users/${name}`)
|
return loadJson(`https://api.github.com/users/${name}`);
|
||||||
.then(response => response.json());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showAvatar(githubUser) {
|
function showAvatar(githubUser) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue