mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
15 lines
401 B
TypeScript
15 lines
401 B
TypeScript
import { GetNezhaData } from "@/lib/serverFetch";
|
|
import { NextResponse } from "next/server";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export async function GET(_: Request) {
|
|
try {
|
|
const response = await GetNezhaData();
|
|
return NextResponse.json(response, { status: 200 });
|
|
} catch (error) {
|
|
console.error(error);
|
|
return NextResponse.json({ error: error }, { status: 400 });
|
|
}
|
|
}
|