covas-bo/web/js/home.js

14 lines
323 B
JavaScript
Raw Normal View History

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