From 508c322c8bddab495db407ec4fb774bc429d2799 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Tue, 17 Mar 2026 15:38:40 +0800 Subject: [PATCH] Fix wallet unlink 401 error --- frontend/app/api/payments/wallets/route.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/app/api/payments/wallets/route.ts b/frontend/app/api/payments/wallets/route.ts index 0e379843..8348abc4 100644 --- a/frontend/app/api/payments/wallets/route.ts +++ b/frontend/app/api/payments/wallets/route.ts @@ -56,12 +56,10 @@ export async function DELETE(req: NextRequest) { try { const auth = await buildBackendRequestHeaders(req); const proxiedHeaders = new Headers(auth.headers); + proxiedHeaders.set("Content-Type", "application/json"); const res = await fetch(`${API_BASE}/api/payments/wallets`, { method: "DELETE", - headers: { - ...proxiedHeaders, - "Content-Type": "application/json", - }, + headers: proxiedHeaders, body: JSON.stringify(payload), cache: "no-store", });