updates
This commit is contained in:
parent
94c83e9e50
commit
cc5213b09e
79 changed files with 1341 additions and 357 deletions
|
@ -1,24 +0,0 @@
|
|||
|
||||
async function getUsers(names) {
|
||||
let jobs = [];
|
||||
|
||||
for(let name of names) {
|
||||
let job = fetch(`https://api.github.com/users/${name}`).then(
|
||||
successResponse => {
|
||||
if (successResponse.status != 200) {
|
||||
return null;
|
||||
} else {
|
||||
return successResponse.json();
|
||||
}
|
||||
},
|
||||
failResponse => {
|
||||
return null;
|
||||
}
|
||||
);
|
||||
jobs.push(job);
|
||||
}
|
||||
|
||||
let results = await Promise.all(jobs);
|
||||
|
||||
return results;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue