add auth header to fetch expertise

This commit is contained in:
mario
2025-05-21 16:40:15 +07:00
parent 5130b9f73c
commit 0bb6d19e92

View File

@@ -294,9 +294,20 @@ const SidePanel = ({
return;
}
// Create request headers with Authorization if token exists
const authToken = window.sessionStorage.getItem('ohif-auth-token');
const headers: HeadersInit = {};
if (authToken) {
headers['Authorization'] = `Bearer ${authToken}`;
}
// Fetch data with specific fields including Accession Number
const response = await fetch(
`${qidoRootUrl}/studies?includefield=00080050&StudyInstanceUID=${studyInstanceUID}`
`${qidoRootUrl}/studies?includefield=00080050&StudyInstanceUID=${studyInstanceUID}`,
{
headers,
}
);
if (!response.ok) {