2022-07-25 23:46:32 +02:00
|
|
|
checkToken();
|
|
|
|
|
2022-07-26 00:08:33 +02:00
|
|
|
axios.interceptors.request.use(function (config) {
|
2022-07-25 23:46:32 +02:00
|
|
|
checkToken();
|
2022-07-26 00:08:33 +02:00
|
|
|
return config;
|
|
|
|
}, function (error) {
|
|
|
|
// Do something with request error
|
|
|
|
return Promise.reject(error);
|
|
|
|
});
|
2022-07-25 23:46:32 +02:00
|
|
|
|
2022-07-26 00:08:33 +02:00
|
|
|
instance.get("users/count", { withCredentials: true }).then(function(response){
|
|
|
|
console.log(response.data);
|
|
|
|
|
|
|
|
})
|