perfected the forgejo heatmap, made it prettier and fully visible on all devices

This commit is contained in:
dvorakmortonxd 2026-05-15 12:59:10 +02:00
commit a7357c5764
3 changed files with 27 additions and 30 deletions

View file

@ -1,19 +1,5 @@
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 res = await fetch("https://git.dvorakmortonxd.dev/api/v1/users/dvorakmortonxd/heatmap");
const data = await res.json();
return NextResponse.json(data);
} catch (err) {
return NextResponse.json({ error: "Internal server error" }, { status: 500 });
}
}
return Response.json(data);
}