fix(core.gbapp): #387 adding /setupSecurity multiple tokens. Refresh token fix. @othonlima.
This commit is contained in:
parent
9d1ba4ee8f
commit
8a7dcb5198
2 changed files with 5 additions and 4 deletions
|
@ -620,8 +620,9 @@ export class GBVMService extends GBService {
|
||||||
|
|
||||||
console.log(tokenName + ' updated.');
|
console.log(tokenName + ' updated.');
|
||||||
}
|
}
|
||||||
|
console.log(i);
|
||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
|
console.log('auth defined bear OK: ' + global[tokenName]);
|
||||||
headers['Authorization'] = 'Bearer ' + global[tokenName];
|
headers['Authorization'] = 'Bearer ' + global[tokenName];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -965,7 +966,6 @@ export class GBVMService extends GBService {
|
||||||
});
|
});
|
||||||
|
|
||||||
sandbox['tokens'] = tokensList.join(',');
|
sandbox['tokens'] = tokensList.join(',');
|
||||||
console.log(sandbox['tokens']);
|
|
||||||
sandbox['variables'] = variables;
|
sandbox['variables'] = variables;
|
||||||
sandbox['id'] = sys.getRandomId();
|
sandbox['id'] = sys.getRandomId();
|
||||||
sandbox['username'] = await dk.userName({ pid });
|
sandbox['username'] = await dk.userName({ pid });
|
||||||
|
|
|
@ -155,9 +155,9 @@ export class WhatsappDirectLine extends GBService {
|
||||||
const adminEmail = this.min.core.getParam(this.min.instance, 'Bot Admin E-mail', null);
|
const adminEmail = this.min.core.getParam(this.min.instance, 'Bot Admin E-mail', null);
|
||||||
// Sends QR Code to boot bot admin.
|
// Sends QR Code to boot bot admin.
|
||||||
const msg = `Please, scan QR Code with for bot ${this.botId}.`;
|
const msg = `Please, scan QR Code with for bot ${this.botId}.`;
|
||||||
GBLog.info(msg);
|
|
||||||
qrcode.generate(qr, { small: true, scale: 0.5 });
|
qrcode.generate(qr, { small: true, scale: 0.5 });
|
||||||
// While handling other bots uses boot instance of this class to send QR Codes.
|
|
||||||
|
// TODO: While handling other bots uses boot instance of this class to send QR Codes.
|
||||||
// const s = new DialogKeywords(min., null, null, null);
|
// const s = new DialogKeywords(min., null, null, null);
|
||||||
// const qrBuf = await s.getQRCode(qr);
|
// const qrBuf = await s.getQRCode(qr);
|
||||||
// const localName = Path.join('work', gbaiName, 'cache', `qr${GBAdminService.getRndReadableIdentifier()}.png`);
|
// const localName = Path.join('work', gbaiName, 'cache', `qr${GBAdminService.getRndReadableIdentifier()}.png`);
|
||||||
|
@ -170,6 +170,7 @@ export class WhatsappDirectLine extends GBService {
|
||||||
// );
|
// );
|
||||||
// GBServer.globals.minBoot.whatsAppDirectLine.sendFileToDevice(adminNumber, url, Path.basename(localName), msg);
|
// GBServer.globals.minBoot.whatsAppDirectLine.sendFileToDevice(adminNumber, url, Path.basename(localName), msg);
|
||||||
// s.sendEmail(adminEmail, `Check your WhatsApp for bot ${this.botId}`, msg);
|
// s.sendEmail(adminEmail, `Check your WhatsApp for bot ${this.botId}`, msg);
|
||||||
|
|
||||||
}).bind(this)
|
}).bind(this)
|
||||||
);
|
);
|
||||||
client.on('authenticated', async () => {
|
client.on('authenticated', async () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue