fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
Showing only changes of commit 03586868ec - Show all commits

View file

@ -605,8 +605,8 @@ export class GBVMService extends GBService {
const ensureTokens = async (firstTime) => {
const tokens = this.tokens ? this.tokens.split(',') : [];
for(i in tokens) {
const tokenName = tokens[i];
for(tokenIndexer in tokens) {
const tokenName = tokens[tokenIndexer];
// Auto update Bearar authentication for the first token.
@ -622,7 +622,8 @@ export class GBVMService extends GBService {
global[tokenName] = token;
global[tokenName + "_expiresOn"]= expiresOn;
}
if (i == 0) {
if (tokenIndexer == 0) {
headers['Authorization'] = 'Bearer ' + global[tokenName];
}
}