#6264 - renewToken #1824
|
@ -3,7 +3,7 @@ const tokenConfig = require('./token-config');
|
|||
module.exports = async token => {
|
||||
jsegarra marked this conversation as resolved
Outdated
|
||||
const accessTokenConfig = await tokenConfig();
|
||||
|
||||
const now = new Date();
|
||||
const now = Date.vnNew();
|
||||
const differenceMilliseconds = now - token.created;
|
||||
const differenceSeconds = Math.floor(differenceMilliseconds / 1000);
|
||||
return differenceSeconds > accessTokenConfig.renewPeriod - accessTokenConfig.courtesyTime;
|
||||
|
|
Loading…
Reference in New Issue
Creo que se seria mas correcto usar vnNew()
Mas info: https://wiki.verdnatura.es/index.php/Fechas
Okey, tomo nota.
Lo extraje de lo que hay actualmente de renew-token