perfected the forgejo heatmap, made it prettier and fully visible on all devices
This commit is contained in:
parent
c745cfc304
commit
a7357c5764
3 changed files with 27 additions and 30 deletions
|
|
@ -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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue