Files
2026-04-20 14:56:28 +08:00

24 lines
801 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { NextResponse } from "next/server"
import { config } from "dotenv"
import { resolve } from "path"
if (typeof process !== "undefined" && !process.env.MONGODB_URI) {
config({ path: resolve(process.cwd(), ".env.local") })
}
/** 从代练通等平台对接接口拉取或同步订单;需配置平台 appKey/secret */
export async function POST() {
const appKey = process.env.DAILIAN_APP_KEY
if (!appKey) {
return NextResponse.json({
success: false,
error: "请配置 DAILIAN_APP_KEY代练通等平台正式对接需调用平台 API",
needConfig: true,
})
}
return NextResponse.json({
success: true,
message: "代练通同步接口已就绪,正式对接需调用平台商品/订单 API 并写入 levelingProducts / levelingOrders",
})
}