Skip to content

Commit

Permalink
feat(all): Token retrieve optimized.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Dec 23, 2022
1 parent 5fbaadd commit 6eb9d6c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/admin.gbapp/services/GBAdminService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import Path from 'path';
import PasswordGenerator from 'strict-password-generator';
import crypto from 'crypto';
import Fs from 'fs';
import { GBServer } from '../../../src/app.js';

/**
* Services for server administration.
Expand Down Expand Up @@ -247,10 +248,8 @@ export class GBAdminService implements IGBAdminService {
}

public async acquireElevatedToken (instanceId: number): Promise<string> {
// TODO: Use boot bot as base for authentication.

const botId = GBConfigService.get('BOT_ID');
instanceId = (await this.core.loadInstanceByBotId(botId)).instanceId;
const minBoot = GBServer.globals.minBoot as any;
instanceId = minBoot.instanceId;

return new Promise<string>(async (resolve, reject) => {
const instance = await this.core.loadInstanceById(instanceId);
Expand Down

0 comments on commit 6eb9d6c

Please sign in to comment.