From 59153ded4c6c41a60ef82f8e4e10e7f51ef9de68 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Tue, 26 Jul 2022 00:08:33 +0200 Subject: [PATCH] endpoint count --- web/js/home.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/web/js/home.js b/web/js/home.js index 705c10b..2f0d7ed 100644 --- a/web/js/home.js +++ b/web/js/home.js @@ -1,6 +1,14 @@ checkToken(); -const requestInterceptors = axios.interceptors.request.use(function(){ +axios.interceptors.request.use(function (config) { checkToken(); -}); + return config; + }, function (error) { + // Do something with request error + return Promise.reject(error); + }); +instance.get("users/count", { withCredentials: true }).then(function(response){ + console.log(response.data); + +}) \ No newline at end of file