mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
Merge branch 'main' into cloudflare
This commit is contained in:
commit
06015baf50
@ -9,9 +9,8 @@ export const runtime = 'edge';
|
|||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
interface NezhaDataResponse {
|
interface NezhaDataResponse extends NezhaAPISafe {
|
||||||
error?: string;
|
error?: string;
|
||||||
data?: NezhaAPISafe;
|
|
||||||
cause?: string;
|
cause?: string;
|
||||||
code?: string;
|
code?: string;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ export const dynamic = "force-dynamic";
|
|||||||
|
|
||||||
interface NezhaDataResponse {
|
interface NezhaDataResponse {
|
||||||
error?: string;
|
error?: string;
|
||||||
data?: ServerMonitorChart;
|
|
||||||
cause?: string;
|
cause?: string;
|
||||||
code?: string;
|
code?: string;
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,8 @@ export const dynamic = "force-dynamic";
|
|||||||
|
|
||||||
export const runtime = "edge";
|
export const runtime = "edge";
|
||||||
|
|
||||||
interface NezhaDataResponse {
|
interface NezhaDataResponse extends ServerApi{
|
||||||
error?: string;
|
error?: string;
|
||||||
data?: ServerApi;
|
|
||||||
cause?: string;
|
cause?: string;
|
||||||
code?: string;
|
code?: string;
|
||||||
}
|
}
|
||||||
@ -39,7 +38,7 @@ export const GET = auth(async function GET(req) {
|
|||||||
{ status: 400 },
|
{ status: 400 },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!response.data) {
|
if (!response.result) {
|
||||||
return NextResponse.json({ cause: "fetch data empty" }, { status: 400 });
|
return NextResponse.json({ cause: "fetch data empty" }, { status: 400 });
|
||||||
}
|
}
|
||||||
return NextResponse.json(response, { status: 200 });
|
return NextResponse.json(response, { status: 200 });
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nezha-dash",
|
"name": "nezha-dash",
|
||||||
"version": "0.7.3",
|
"version": "0.7.5",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3020",
|
"dev": "next dev -p 3020",
|
||||||
|
Loading…
Reference in New Issue
Block a user