From e07152bc07beae48cc1217832951923fc6f0bc12 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Sun, 28 Aug 2022 07:01:23 -0300 Subject: [PATCH] fix(core.gbapp): More information on bot creation. --- packages/core.gbapp/services/GBDeployer.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/core.gbapp/services/GBDeployer.ts b/packages/core.gbapp/services/GBDeployer.ts index 190b0ecd..925c3026 100644 --- a/packages/core.gbapp/services/GBDeployer.ts +++ b/packages/core.gbapp/services/GBDeployer.ts @@ -202,7 +202,7 @@ export class GBDeployer implements IGBDeployer { /** * Deploys a new blank bot to the database, cognitive services and other services. */ - public async deployBlankBot(botId: string) { + public async deployBlankBot(botId: string, mobile: string = null, email: string = null) { // Creates a new row on the GuaribasInstance table. @@ -231,6 +231,7 @@ export class GBDeployer implements IGBDeployer { instance.whatsappServiceKey = bootInstance.whatsappServiceKey; instance.whatsappServiceNumber = bootInstance.whatsappServiceNumber; instance.whatsappServiceUrl = bootInstance.whatsappServiceUrl; + instance.params = JSON.stringify({ 'Can Publish': mobile, 'Admin Notify E-mail': email }); // Saves bot information to the store. @@ -517,11 +518,11 @@ export class GBDeployer implements IGBDeployer { Fs.utimesSync(itemPath, new Date(), new Date(item.lastModifiedDateTime)); } - else{ + else { GBLog.info(`Local is up to date: ${itemPath}...`); } } - }); + }); } } /** @@ -808,7 +809,7 @@ export class GBDeployer implements IGBDeployer { // Install modules and compiles the web app. GBLog.info(`Installing modules default.gbui (It may take a few minutes)...`); - + child_process.execSync(`${npm} install`, { cwd: root }); GBLog.info(`Transpiling default.gbui...`);