Integration TrizRis OHIF: key images, annotations, layouts, access control and reconstruction
Build and Deploy Docs / build-and-deploy-docs (push) Canceled after 0s
Build and Deploy Docs / build-and-deploy-docs (push) Canceled after 0s
This commit is contained in:
1 parent
bbe37ff388
commit
f00379a672
28 files changed
+1898
-105
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import { TrizRisConfig } from '@ohif/core/src/config/TrizRisConfig';
|
||||
|
||||
const ACCESS_URL = `${TrizRisConfig.apiBaseUrl}/ohif/access`;
|
||||
|
||||
export async function checkTrizRisAccess(): Promise<boolean> {
|
||||
try {
|
||||
const response = await fetch(ACCESS_URL, {
|
||||
method: 'GET',
|
||||
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
},
|
||||
|
||||
credentials: 'include',
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
return result.authorized === true;
|
||||
} catch (error) {
|
||||
console.error('### ERREUR VERIFICATION ACCES TRIZRIS ###', error);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user