fix(core.gbapp): #387 adding /setupSecurity multiple tokens. Refresh token fix. @othonlima.

This commit is contained in:
Rodrigo Rodriguez 2023-12-26 11:32:52 -03:00
parent efa5e0fd03
commit 40d07a43c0

View file

@ -606,6 +606,7 @@ export class GBVMService extends GBService {
const tokens = this.tokens ? this.tokens.split(',') : [];
for(i in tokens) {
const tokenNAme = tokens[i];
const expiresOn = new Date(global[tokenName + "_expiresOn"]);
if (expiresOn.getTime() > new Date().getTime()) {
@ -614,6 +615,8 @@ export class GBVMService extends GBService {
global[tokenName] = token;
global[tokenName + "_expiresOn"]= expiresOn;
console.log(tokenName + ' updated.');
}
}
};