0
0
Fork 0

perf: #7190 remove comments

This commit is contained in:
Javier Segarra 2024-04-23 07:56:07 +02:00
parent 74eec098ac
commit 6018d51642
1 changed files with 1 additions and 4 deletions

View File

@ -90,6 +90,7 @@ export function useSession() {
await useRole().fetch(); await useRole().fetch();
await useUserConfig().fetch(); await useUserConfig().fetch();
await useTokenConfig().fetch(); await useTokenConfig().fetch();
startInterval(); startInterval();
} }
@ -105,8 +106,6 @@ export function useSession() {
const renewPeriod = +sessionStorage.getItem('renewPeriod'); const renewPeriod = +sessionStorage.getItem('renewPeriod');
if (!renewPeriod) return; if (!renewPeriod) return;
intervalId = setInterval(() => checkValidity(), renewPeriod * 1000); intervalId = setInterval(() => checkValidity(), renewPeriod * 1000);
// JUST FOR TEST
// checkValidity();
} }
function stopRenewer() { function stopRenewer() {
@ -144,10 +143,8 @@ export function useSession() {
//COMMENT THIS IF JUST FOR TEST //COMMENT THIS IF JUST FOR TEST
if (isNaN(renewPeriodInSeconds) || now <= maxDate) { if (isNaN(renewPeriodInSeconds) || now <= maxDate) {
console.error('Token not renewed');
return (isCheckingToken = false); return (isCheckingToken = false);
} }
console.error('Token renewed');
await renewToken(); await renewToken();
isCheckingToken = false; isCheckingToken = false;