diff --git a/index.ts b/index.ts index d28106f..876ac0e 100644 --- a/index.ts +++ b/index.ts @@ -16,10 +16,10 @@ if (process.env.AuthorizationHeaderToken) { const getTopLangs = async (type: "users" | "orgs", name: string) => { const obj: Record = {} - const userRepoResp = await fetch(`https://git.creations.works/api/v1/${type}/${name}/repos?limit=0`, fetchOpts); - const userRepos = await userRepoResp.json() as repos; + const repoResp = await fetch(`https://git.creations.works/api/v1/${type}/${name}/repos?limit=0`, fetchOpts); + const repos = await repoResp.json() as repos; - for (const repo of userRepos) { + for (const repo of repos) { const lang = repo.language; if (obj[lang] && lang !== "") {