diff options
Diffstat (limited to 'src/services/repos/github.ts')
| -rw-r--r-- | src/services/repos/github.ts | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/services/repos/github.ts b/src/services/repos/github.ts deleted file mode 100644 index 37400ad..0000000 --- a/src/services/repos/github.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { RepoData } from '@ts/types/github'; - -/** - * Retrieve repository data from Github by slug. - * @param repo - The repository slug. - * @returns {Promise<RepoData>} - The repository data. - */ -export const getRepoData = async (repo: string): Promise<RepoData> => { - const user = process.env.NEXT_PUBLIC_GITHUB_USER; - const api = `https://api.github.com/repos/${user}/${repo}`; - - const response = await fetch(api); - - return response.json(); -}; |
