From a4cf09ee4d5dc388878175fd98b17d4d8045c6dc Mon Sep 17 00:00:00 2001 From: bindeali <56399637+bindeali@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:43:50 +0200 Subject: [PATCH] Update InterfaceNotification.tsx --- src/components/InterfaceNotification.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/InterfaceNotification.tsx b/src/components/InterfaceNotification.tsx index ec74fcdf..575d8d71 100644 --- a/src/components/InterfaceNotification.tsx +++ b/src/components/InterfaceNotification.tsx @@ -6,7 +6,7 @@ import { Environment } from "../config/Environment"; import CheckCircleIcon from "@mui/icons-material/CheckCircle"; import { createTheme, ThemeProvider } from "@mui/material/styles"; import green from "@mui/material/colors/green"; - +import { getToken } from "@opendata-mvcr/assembly-line-shared"; const theme = createTheme({ palette: { success: { main: green[600] }, @@ -91,7 +91,10 @@ export default class InterfaceNotification extends React.Component< AppSettings.contextEndpoint + "?query=select%20*%20where%20%7B%3Fs%20%3Fp%20%3Fo.%7D%20limit%201", { - headers: { Accept: "application/json" }, + headers: { + Accept: "application/json", + ...(Environment.auth && { Authorization: `${getToken()}` }), + }, method: "GET", signal, }