diff --git a/client/src/Components/Home.tsx b/client/src/Components/Home.tsx index 3f07706..24e73f7 100644 --- a/client/src/Components/Home.tsx +++ b/client/src/Components/Home.tsx @@ -78,7 +78,8 @@ export default function Home() { if (currentToken) { const repoSub = await subscribeRepoPostReq( accessToken, - repo + repo, + currentToken ); if (!repoSub.ok) { toast.error("Error Subscribing to Repo"); diff --git a/client/src/fetchers/subscribeRepo.ts b/client/src/fetchers/subscribeRepo.ts index f0f9abe..6a04b5e 100644 --- a/client/src/fetchers/subscribeRepo.ts +++ b/client/src/fetchers/subscribeRepo.ts @@ -1,4 +1,8 @@ -export async function subscribeRepoPostReq(accessToken: string, repoLink: string) { +export async function subscribeRepoPostReq( + accessToken: string, + repoLink: string, + currentToken: string +) { try { const response = await fetch( `${import.meta.env.VITE_SERVER}/subscribeRepo`, @@ -8,7 +12,7 @@ export async function subscribeRepoPostReq(accessToken: string, repoLink: string "Content-Type": "application/json", Authorization: accessToken, }, - body: JSON.stringify({ repoLink }), + body: JSON.stringify({ repoLink, token: currentToken }), } ); const data = await response.json(); diff --git a/server/.gitignore b/server/.gitignore index b0937d0..b672e94 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -3,4 +3,4 @@ .env -/src/utils/github-chrome-extension-firebase-adminsdk \ No newline at end of file +/src/utils/github-chrome-extension-firebase-adminsdk.json \ No newline at end of file