refactor(env, i18n, http): 更新环境配置与错误提示信息

修改 .env.example,简化 API 配置说明并明确生产环境要求。更新多语言错误提示,确保用户在未启用 API 代理时获得清晰反馈。重构 admin-http.ts,优化 API 基础 URL 的解析逻辑,提升代码可维护性。
This commit is contained in:
2026-05-29 11:48:13 +08:00
parent d90ca3c66b
commit 671c737781
10 changed files with 123 additions and 54 deletions

View File

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