深度清理 Polymarket 代码:删除10个文件+3个API路由+客户端引用

删除 MarketOverviewView、MarketDecisionLine、market-scan-state、use-city-market-scan、AnalyticsPanel、TerminalDashboard、polymarket-market-links、lib/types、market-scan 路由、use-ai-city-card-data。scan-terminal-client 移除 getMarketScan 和 skip_polymarket。
This commit is contained in:
2569718930@qq.com
2026-05-25 19:50:28 +08:00
parent a3c4fd522b
commit 2d9e99760f
14 changed files with 0 additions and 2081 deletions
@@ -1,53 +0,0 @@
import { NextRequest, NextResponse } from "next/server";
import { proxyBackendJsonGet } from "@/lib/api-proxy";
import { buildForceRefreshProxyCachePolicy } from "@/lib/proxy-cache-policy";
const API_BASE = process.env.POLYWEATHER_API_BASE_URL;
export async function GET(
req: NextRequest,
context: { params: Promise<{ name: string }> },
) {
if (!API_BASE) {
const response = NextResponse.json(
{ error: "POLYWEATHER_API_BASE_URL is not configured" },
{ status: 500 },
);
return response;
}
const { name } = await context.params;
const params = new URLSearchParams();
const forceRefresh = req.nextUrl.searchParams.get("force_refresh") ?? "false";
params.set("force_refresh", forceRefresh);
const cachePolicy = buildForceRefreshProxyCachePolicy(forceRefresh, 20);
const targetDate = req.nextUrl.searchParams.get("target_date");
if (targetDate) {
params.set("target_date", targetDate);
}
const marketSlug = req.nextUrl.searchParams.get("market_slug");
if (marketSlug) {
params.set("market_slug", marketSlug);
}
const lite = req.nextUrl.searchParams.get("lite");
if (lite) {
params.set("lite", lite);
}
const url = `${API_BASE}/api/city/${encodeURIComponent(name)}/market-scan?${params.toString()}`;
return proxyBackendJsonGet(req, {
cacheControl: cachePolicy.responseCacheControl,
detailLimit: 800,
error: "Backend city market scan failed",
fetchCache:
cachePolicy.fetchMode === "no-store" ? "no-store" : undefined,
publicMessage: "Failed to fetch city market scan",
revalidateSeconds: cachePolicy.revalidateSeconds,
statusOnException: 502,
url,
});
}