Make use of loadJson inside loadGithubUser

This commit is contained in:
Yan 2021-08-06 13:38:08 -04:00 committed by GitHub
parent ef8d576821
commit 12d79680e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,8 +332,7 @@ function loadJson(url) {
}
function loadGithubUser(name) {
return fetch(`https://api.github.com/users/${name}`)
.then(response => response.json());
return loadJson(`https://api.github.com/users/${name}`);
}
function showAvatar(githubUser) {