refs #5554 console.log
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-06-27 08:07:54 +02:00
parent 15e39b5fec
commit 46ffd8d95a
2 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,8 @@ module.exports = Self => {
const accessTokenConfig = await models.AccessTokenConfig.findOne({fields: ['renewPeriod']});
console.log(userId, created, now, differenceMilliseconds, differenceSeconds, accessTokenConfig.renewPeriod, differenceSeconds <= accessTokenConfig.renewPeriod);
if (differenceSeconds <= accessTokenConfig.renewPeriod)
throw new UserError(`The renew period has not been exceeded`);

View File

@ -49,6 +49,7 @@ export class Layout extends Component {
const differenceMilliseconds = now - new Date(this.vnToken.created);
const differenceSeconds = Math.floor(differenceMilliseconds / 1000);
console.log(this.vnToken.created, now, differenceMilliseconds, differenceSeconds, this.renewPeriod, differenceSeconds > this.renewPeriod);
if (differenceSeconds > this.renewPeriod) {
this.$http.post('VnUsers/renewToken')
.then(json => {