refactor(env, api, i18n): 更新环境配置与API代理逻辑

修改 .env.example,优化API配置说明并明确线上环境要求。更新多语言错误提示,确保用户在未启用API代理时获得清晰反馈。重构API代理逻辑,移除开发代理文件,简化代码结构,提升可维护性。
This commit is contained in:
2026-05-29 15:55:18 +08:00
parent 671c737781
commit 36117144dc
10 changed files with 70 additions and 24 deletions

View File

@@ -1,12 +1,12 @@
import { type NextRequest } from "next/server";
import { proxyLotteryApiInDev } from "@/lib/lottery-api-dev-proxy";
import { proxyLotteryApi } from "@/lib/lottery-api-proxy";
type RouteContext = { params: Promise<{ path: string[] }> };
async function handle(request: NextRequest, context: RouteContext) {
const { path } = await context.params;
return proxyLotteryApiInDev(request, path);
return proxyLotteryApi(request, path);
}
export const GET = handle;