Skip to content
Snippets Groups Projects

Sprint/2020 19

Merged Marcel Nellesen requested to merge Sprint/2020-19 into master
6 files
+ 45
2
Compare changes
  • Side-by-side
  • Inline

Files

+ 16
1
@@ -2,7 +2,22 @@ const axios = require('axios');
@@ -2,7 +2,22 @@ const axios = require('axios');
const authHeaderKey = 'Authorization';
const authHeaderKey = 'Authorization';
const clientCorrolationIdKey = 'X-Coscine-Logging-CorrelationId';
const clientCorrolationIdKey = 'X-Coscine-Logging-CorrelationId';
axios.interceptors.request.use((request: any) => {
 
if ((typeof coscine !== "undefined") && (typeof coscine.loading !== "undefined") && (typeof coscine.loading.counter !== "undefined")) {
 
coscine.loading.counter++;
 
}
 
return request;
 
}, (error: any) => {
 
return Promise.reject(error);
 
});
 
axios.interceptors.response.use(function (response: any) {
 
if ((typeof coscine !== "undefined") && (typeof coscine.loading !== "undefined") && (typeof coscine.loading.counter !== "undefined")) {
 
coscine.loading.counter--;
 
}
 
return response;
 
}, function (error: any) {
 
return Promise.reject(error);
 
});
export default {
export default {
getHostName() {
getHostName() {
let hostName = window.location.hostname;
let hostName = window.location.hostname;
Loading