add auth header to fetch expertise
This commit is contained in:
@@ -294,9 +294,20 @@ const SidePanel = ({
|
|||||||
return;
|
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
|
// Fetch data with specific fields including Accession Number
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`${qidoRootUrl}/studies?includefield=00080050&StudyInstanceUID=${studyInstanceUID}`
|
`${qidoRootUrl}/studies?includefield=00080050&StudyInstanceUID=${studyInstanceUID}`,
|
||||||
|
{
|
||||||
|
headers,
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user