Adjust wallet unlink token handling

This commit is contained in:
2569718930@qq.com
2026-03-17 15:13:57 +08:00
parent 7510e0a1e0
commit 5d2ed68cdf
@@ -1334,7 +1334,9 @@ export function AccountCenter() {
setPaymentError(""); setPaymentError("");
setPaymentInfo(""); setPaymentInfo("");
try { try {
const headers = await buildAuthedHeaders(true, true); // Do not hard-fail on client-side token refresh here.
// The same-origin API route can still authenticate via server-side Supabase session cookies.
const headers = await buildAuthedHeaders(true, false);
const res = await fetch("/api/payments/wallets", { const res = await fetch("/api/payments/wallets", {
method: "DELETE", method: "DELETE",
headers, headers,