fix(all): Minor changes in PROD.
This commit is contained in:
parent
44bc37c2e6
commit
e415bb01ca
4 changed files with 3 additions and 7 deletions
|
@ -205,7 +205,6 @@ export class GBDeployer implements IGBDeployer {
|
||||||
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;
|
||||||
|
|
||||||
|
@ -230,9 +229,6 @@ export class GBDeployer implements IGBDeployer {
|
||||||
instance.state = 'active';
|
instance.state = 'active';
|
||||||
instance.nlpScore = 0.8;
|
instance.nlpScore = 0.8;
|
||||||
instance.searchScore = 0.25;
|
instance.searchScore = 0.25;
|
||||||
instance.whatsappServiceKey = null;
|
|
||||||
instance.whatsappServiceNumber = null;
|
|
||||||
instance.whatsappServiceUrl = null;
|
|
||||||
instance.params = JSON.stringify({ 'Can Publish': mobile, 'Admin Notify E-mail': email });
|
instance.params = JSON.stringify({ 'Can Publish': mobile, 'Admin Notify E-mail': email });
|
||||||
|
|
||||||
// Saves bot information to the store.
|
// Saves bot information to the store.
|
||||||
|
|
|
@ -99,7 +99,7 @@ export class GBImporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async createBotInstance (botId: string) {
|
public async createBotInstance (botId: string) {
|
||||||
const fullSettingsJson = <GuaribasInstance>{ ...GBServer.globals.bootInstance };
|
const fullSettingsJson = <GuaribasInstance>{ };
|
||||||
fullSettingsJson['botId'] = botId;
|
fullSettingsJson['botId'] = botId;
|
||||||
|
|
||||||
return await GuaribasInstance.create(fullSettingsJson);
|
return await GuaribasInstance.create(fullSettingsJson);
|
||||||
|
|
|
@ -771,7 +771,7 @@ export class GBMinService {
|
||||||
await min.whatsAppDirectLine.setup(true);
|
await min.whatsAppDirectLine.setup(true);
|
||||||
} else {
|
} else {
|
||||||
const minBoot = GBServer.globals.minBoot as any;
|
const minBoot = GBServer.globals.minBoot as any;
|
||||||
if (min !== minBoot) {
|
if (min !== minBoot && minBoot.instance.whatsappServiceKey) {
|
||||||
min.whatsAppDirectLine = new WhatsappDirectLine(
|
min.whatsAppDirectLine = new WhatsappDirectLine(
|
||||||
min,
|
min,
|
||||||
min.botId,
|
min.botId,
|
||||||
|
|
|
@ -286,7 +286,7 @@ export class GBSSR {
|
||||||
|
|
||||||
const onlyChars = /\/([A-Za-z0-9\-\_]+)\/*/.exec(req.originalUrl);
|
const onlyChars = /\/([A-Za-z0-9\-\_]+)\/*/.exec(req.originalUrl);
|
||||||
|
|
||||||
let botId = (req.originalUrl && req.originalUrl === '/') || onlyChars.length === 0 ? minBoot.botId : onlyChars[1];
|
let botId = (req.originalUrl && req.originalUrl === '/') || onlyChars ? onlyChars[1] : minBoot.botId;
|
||||||
|
|
||||||
let min: GBMinInstance =
|
let min: GBMinInstance =
|
||||||
req.url === '/'
|
req.url === '/'
|
||||||
|
|
Loading…
Add table
Reference in a new issue