Skip to content

Commit

Permalink
fix(core.gbapp): FIX SSR errors and setOption impersonated.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Jul 26, 2023
1 parent 23973e3 commit 0fe2bdb
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions packages/core.gbapp/services/GBDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,14 @@ export class GBDeployer implements IGBDeployer {
* Deploys a new blank bot to the database, cognitive services and other services.
*/
public async deployBlankBot(botId: string, mobile: string, email: string) {

// Creates a new row on the GuaribasInstance table.

const instance = await this.importer.createBotInstance(botId);
const bootInstance = GBServer.globals.bootInstance;

// Gets the access token to perform service operations.

const accessToken = await
(GBServer.globals.minBoot.adminService as any)['acquireElevatedToken']
(bootInstance.instanceId, true);
Expand Down Expand Up @@ -276,22 +278,6 @@ export class GBDeployer implements IGBDeployer {
);
} else {
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.

Expand Down

0 comments on commit 0fe2bdb

Please sign in to comment.