fix: billing portal session header and response format mismatch

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Lint Roller
2026-03-29 21:19:23 +00:00
parent 753080ecc4
commit c67606fe42
2 changed files with 3 additions and 3 deletions
@@ -46,7 +46,7 @@ export function BillingPayments({ sessionId, readOnly }: BillingPaymentsProps) {
try {
const response = await fetch("/api/portal/invoices", {
headers: {
"x-session-id": sessionId,
"X-Impersonation-Session-Id": sessionId,
},
});
@@ -55,7 +55,7 @@ export function BillingPayments({ sessionId, readOnly }: BillingPaymentsProps) {
}
const data = await response.json();
setInvoices(data.invoices || []);
setInvoices(Array.isArray(data) ? data : data.invoices || []);
setPaymentMethods(data.paymentMethods || []);
setPackages(data.packages || []);
} catch (err) {
+1 -1
View File
@@ -92,7 +92,7 @@ export function Dashboard({
try {
const headers = {
"x-session-id": sessionId,
"X-Impersonation-Session-Id": sessionId,
};
const [appointmentsRes, petsRes, invoicesRes, brandingRes] = await Promise.all([