fix(web): add X-Impersonation-Session-Id header to portal API calls
This commit also includes GRO-287 fixes: - PasswordChange: add stateful form with password-match validation - ReportCards: replace window.location.reload() with refetch via useRef Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -118,7 +118,7 @@ export const AppointmentsSection: React.FC<AppointmentsSectionProps> = ({ sessio
|
||||
|
||||
try {
|
||||
const response = await fetch('/api/portal/appointments', {
|
||||
headers: { Authorization: `Bearer ${sessionId}` },
|
||||
headers: { "X-Impersonation-Session-Id": sessionId ?? "" },
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
@@ -744,10 +744,10 @@ function BookingFlow({ onClose, sessionId }: BookingFlowProps) {
|
||||
try {
|
||||
const [petsRes, servicesRes] = await Promise.all([
|
||||
fetch('/api/portal/pets', {
|
||||
headers: { Authorization: `Bearer ${sessionId}` },
|
||||
headers: { "X-Impersonation-Session-Id": sessionId ?? "" },
|
||||
}),
|
||||
fetch('/api/portal/services', {
|
||||
headers: { Authorization: `Bearer ${sessionId}` },
|
||||
headers: { "X-Impersonation-Session-Id": sessionId ?? "" },
|
||||
}),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user