added a git heatmap from my forgejo instance to the website

This commit is contained in:
dvorakmortonxd 2026-05-15 11:37:46 +02:00
commit c745cfc304
4 changed files with 193 additions and 1 deletions

View file

@ -0,0 +1,19 @@
import { NextResponse } from "next/server";
export async function GET() {
try {
const res = await fetch("https://git.dvorakmortonxd.dev/api/v1/users/dvorakmortonxd/heatmap", {
next: { revalidate: 3600 }, // Cache for 1 hour
});
if (!res.ok) {
return NextResponse.json({ error: "Failed to fetch heatmap" }, { status: res.status });
}
const data = await res.json();
return NextResponse.json(data);
} catch (err) {
return NextResponse.json({ error: "Internal server error" }, { status: 500 });
}
}