Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
removes unused statusCode function
Browse files Browse the repository at this point in the history
  • Loading branch information
bdougie committed Apr 3, 2024
1 parent c5d1923 commit 934f16e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,9 @@ const getRepoLink = (repoName: string | null) =>
const getRepoIssuesLink = (repoName: string | null) =>
`https://github.com/${repoName && `${repoName}/issues` || ""}`;

async function userStatusCode (owner: string) {
const apiUserUrl = `https://api.github.com/users/${owner}`;
const response = await fetch(apiUserUrl);
const { login } = await response.json();

if (apiUserUrl !== response.url) {
return [301, login];
}
return [response.status, ""];
}

export {
getAvatarLink,
getProfileLink,
getRepoLink,
getRepoIssuesLink,
userStatusCode,
};

0 comments on commit 934f16e

Please sign in to comment.