Fix wallet unlink 401 error

This commit is contained in:
2569718930@qq.com
2026-03-17 15:38:40 +08:00
parent 5a6d9eeda4
commit 508c322c8b
+2 -4
View File
@@ -56,12 +56,10 @@ export async function DELETE(req: NextRequest) {
try { try {
const auth = await buildBackendRequestHeaders(req); const auth = await buildBackendRequestHeaders(req);
const proxiedHeaders = new Headers(auth.headers); const proxiedHeaders = new Headers(auth.headers);
proxiedHeaders.set("Content-Type", "application/json");
const res = await fetch(`${API_BASE}/api/payments/wallets`, { const res = await fetch(`${API_BASE}/api/payments/wallets`, {
method: "DELETE", method: "DELETE",
headers: { headers: proxiedHeaders,
...proxiedHeaders,
"Content-Type": "application/json",
},
body: JSON.stringify(payload), body: JSON.stringify(payload),
cache: "no-store", cache: "no-store",
}); });