's'
This commit is contained in:
@@ -125,6 +125,8 @@ export async function POST(request: NextRequest) {
|
||||
const type = String(body?.type || "vip");
|
||||
const channel = String(body?.channel || "wxpay");
|
||||
const device = String(body?.device || "pc");
|
||||
const accept = request.headers.get("accept") || "";
|
||||
const wantHtml = String(body?.html) === "1" || accept.includes("text/html");
|
||||
|
||||
if (!user_id) {
|
||||
if (wantHtml) {
|
||||
@@ -142,9 +144,6 @@ export async function POST(request: NextRequest) {
|
||||
: request.headers.get("origin") || "http://localhost:3000";
|
||||
const finalReturnUrl = return_url || `${origin}/paid`;
|
||||
|
||||
const accept = request.headers.get("accept") || "";
|
||||
const wantHtml = String(body?.html) === "1" || accept.includes("text/html");
|
||||
|
||||
if (!wantHtml) {
|
||||
return NextResponse.json({ ok: false, error: "请传 html=1" }, { status: 400 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user