fix(all): Create bot working again.
This commit is contained in:
parent
fc28eb9ec0
commit
ed74c5b003
1 changed files with 15 additions and 15 deletions
|
@ -113,14 +113,14 @@ export class GBAdminService implements IGBAdminService {
|
|||
|
||||
public static getNumberIdentifier(digits: number = 14): string {
|
||||
|
||||
if (digits <= 0) {
|
||||
throw new Error('Number of digits should be greater than 0.');
|
||||
}
|
||||
if (digits <= 0) {
|
||||
throw new Error('Number of digits should be greater than 0.');
|
||||
}
|
||||
|
||||
const min = 10 ** (digits - 1);
|
||||
const max = 10 ** digits - 1;
|
||||
const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
return randomNumber.toString();
|
||||
const min = 10 ** (digits - 1);
|
||||
const max = 10 ** digits - 1;
|
||||
const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
return randomNumber.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -169,8 +169,8 @@ export class GBAdminService implements IGBAdminService {
|
|||
|
||||
// .gbot packages are handled using storage API, so no download
|
||||
// of local resources is required.
|
||||
const gbai = DialogKeywords.getGBAIPath(min.instance.botId);
|
||||
await deployer ['downloadFolder'](min,
|
||||
const gbai = DialogKeywords.getGBAIPath(min.instance.botId);
|
||||
await deployer['downloadFolder'](min,
|
||||
Path.join('work', `${gbai}`),
|
||||
Path.basename(localFolder));
|
||||
await deployer['deployPackage2'](min, user, localFolder);
|
||||
|
@ -226,7 +226,7 @@ export class GBAdminService implements IGBAdminService {
|
|||
|
||||
public async acquireElevatedToken(instanceId: number, root: boolean = false): Promise<string> {
|
||||
|
||||
if (root){
|
||||
if (root) {
|
||||
const minBoot = GBServer.globals.minBoot;
|
||||
instanceId = minBoot.instance.instanceId;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue