Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Added GH OAuth token for fetching stargazers count

Steven Tey6e1b5f3ef399
diff --git a/pages/index.tsx b/pages/index.tsx
index c45512849a..81fb07e86b 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -46,7 +46,13 @@ export default function Home({ stars }: { stars: number }) {
export async function getStaticProps() {
const { stargazers_count: stars } = await fetch(
- "https://api.github.com/repos/steven-tey/dub"
+ "https://api.github.com/repos/steven-tey/dub",
+ {
+ headers: {
+ Authorization: `Bearer ${process.env.GITHUB_OAUTH_TOKEN}`,
+ "Content-Type": "application/json",
+ },
+ }
).then((res) => res.json());
return {