Skip to content

Commit 3733049

Browse files
committed
Revalidate endpoints
1 parent e13a3df commit 3733049

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

Diff for: apps/web/app/api/revalidate/sponsors/route.ts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { revalidatePath } from "next/cache"
2+
3+
export async function POST(request: Request) {
4+
try {
5+
const text = await request.text()
6+
console.log("[GitHub] Webhook received", text)
7+
8+
revalidatePath("/")
9+
} catch (error: any) {
10+
return new Response(`Webhook error: ${error.message}`, {
11+
status: 400,
12+
})
13+
}
14+
15+
return new Response("Success!", {
16+
status: 200,
17+
})
18+
}

Diff for: apps/web/app/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default function HomePage() {
4040
<Pricing />
4141

4242
<h3 className="text-center pb-8 text-primary/60 text-lg">Sponsors</h3>
43-
<LatestSponsor className="mb-2" />
43+
<LatestSponsor className="mb-4" />
4444
<AllSponsors cta="Become a sponsor" className="mb-24" />
4545

4646
<PoweredBy className="mb-8 text-center flex items-center justify-center gap-4 w-full flex-wrap" />

0 commit comments

Comments
 (0)