fix(core.gbapp): FIX SSR errors and setOption impersonated.
This commit is contained in:
parent
23973e3aef
commit
0fe2bdbe6f
1 changed files with 2 additions and 16 deletions
|
@ -203,12 +203,14 @@ export class GBDeployer implements IGBDeployer {
|
||||||
* Deploys a new blank bot to the database, cognitive services and other services.
|
* Deploys a new blank bot to the database, cognitive services and other services.
|
||||||
*/
|
*/
|
||||||
public async deployBlankBot(botId: string, mobile: string, email: string) {
|
public async deployBlankBot(botId: string, mobile: string, email: string) {
|
||||||
|
|
||||||
// Creates a new row on the GuaribasInstance table.
|
// Creates a new row on the GuaribasInstance table.
|
||||||
|
|
||||||
const instance = await this.importer.createBotInstance(botId);
|
const instance = await this.importer.createBotInstance(botId);
|
||||||
const bootInstance = GBServer.globals.bootInstance;
|
const bootInstance = GBServer.globals.bootInstance;
|
||||||
|
|
||||||
// Gets the access token to perform service operations.
|
// Gets the access token to perform service operations.
|
||||||
|
|
||||||
const accessToken = await
|
const accessToken = await
|
||||||
(GBServer.globals.minBoot.adminService as any)['acquireElevatedToken']
|
(GBServer.globals.minBoot.adminService as any)['acquireElevatedToken']
|
||||||
(bootInstance.instanceId, true);
|
(bootInstance.instanceId, true);
|
||||||
|
@ -276,22 +278,6 @@ export class GBDeployer implements IGBDeployer {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
const botId = GBConfigService.get('BOT_ID');
|
const botId = GBConfigService.get('BOT_ID');
|
||||||
const bootInstance = await this.core.loadInstanceByBotId(botId);
|
|
||||||
|
|
||||||
instance.searchHost = bootInstance.searchHost;
|
|
||||||
instance.searchIndex = bootInstance.searchIndex;
|
|
||||||
instance.searchIndexer = bootInstance.searchIndexer;
|
|
||||||
instance.searchKey = bootInstance.searchKey;
|
|
||||||
instance.whatsappServiceKey = bootInstance.whatsappServiceKey;
|
|
||||||
instance.whatsappServiceNumber = bootInstance.whatsappServiceNumber;
|
|
||||||
instance.whatsappServiceUrl = bootInstance.whatsappServiceUrl;
|
|
||||||
instance.storageServer = bootInstance.storageServer;
|
|
||||||
instance.storageName = bootInstance.storageName;
|
|
||||||
instance.storageUsername = bootInstance.storageUsername;
|
|
||||||
instance.storagePassword = bootInstance.storagePassword;
|
|
||||||
instance.cloudLocation = bootInstance.cloudLocation;
|
|
||||||
instance.speechEndpoint = bootInstance.speechEndpoint;
|
|
||||||
instance.speechKey = bootInstance.speechKey;
|
|
||||||
|
|
||||||
// Internally create resources on cloud provider.
|
// Internally create resources on cloud provider.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue