diff --git a/aas-web-ui/src/components/SubmodelPlugins/TimeSeriesData.vue b/aas-web-ui/src/components/SubmodelPlugins/TimeSeriesData.vue index d350de9..a72d2c6 100644 --- a/aas-web-ui/src/components/SubmodelPlugins/TimeSeriesData.vue +++ b/aas-web-ui/src/components/SubmodelPlugins/TimeSeriesData.vue @@ -479,7 +479,7 @@ let context = 'fetching data from Time Series Database'; let disableMessage = false; // send the request - this.postRequest(path, content, headers, context, disableMessage).then((response: any) => { + this.postRequest(path, content, headers, context, disableMessage, true).then((response: any) => { if (response.success) { // this.navigationStore.dispatchSnackbar({ status: true, timeout: 2000, color: 'success', btnColor: 'buttonText', text: 'Succesfully retrieved data!' }); this.convertInfluxCSVtoArray(response.data); diff --git a/aas-web-ui/src/mixins/RequestHandling.ts b/aas-web-ui/src/mixins/RequestHandling.ts index 3085d96..c8c8b9e 100644 --- a/aas-web-ui/src/mixins/RequestHandling.ts +++ b/aas-web-ui/src/mixins/RequestHandling.ts @@ -93,8 +93,17 @@ export default defineComponent({ }, // Function to send post Request which returns a Promise - postRequest(path: string, body: any, headers: Headers, context: string, disableMessage: boolean): any { - headers = this.addAuthorizationHeader(headers); // Add the Authorization header + postRequest( + path: string, + body: any, + headers: Headers, + context: string, + disableMessage: boolean, + isTSRequest: boolean = false + ): any { + if (!isTSRequest) { + headers = this.addAuthorizationHeader(headers); // Add the Authorization header + } return fetch(path, { method: 'POST', body: body, headers: headers }) .then((response) => { // Check if the Server responded with content