MonitorPanel 从独立 API 改为复用 DashboardStore 数据,砍掉 /api/m 和 /m/json

This commit is contained in:
2569718930@qq.com
2026-05-14 00:43:19 +08:00
parent 7a28810f25
commit c006d13fea
4 changed files with 133 additions and 246 deletions
-13
View File
@@ -1,13 +0,0 @@
import { NextRequest, NextResponse } from "next/server";
import { buildBackendRequestHeaders } from "@/lib/backend-auth";
const API_BASE = process.env.POLYWEATHER_API_BASE_URL;
export async function GET(req: NextRequest) {
if (!API_BASE) {
return NextResponse.json({ error: "API not configured" }, { status: 500 });
}
const auth = await buildBackendRequestHeaders(req, { includeSupabaseIdentity: false });
const res = await fetch(`${API_BASE}/m/json`, { headers: auth.headers });
return NextResponse.json(await res.json());
}