Skip to content

Commit

Permalink
fix(security.gbalib): Transfer issues fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Dec 8, 2021
1 parent 64d9884 commit 660faaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions packages/core.gbapp/services/GBDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -831,9 +831,11 @@ export class GBDeployer implements IGBDeployer {
express.static(urlJoin('work', gbaiName, filename, 'audios')));
GBServer.globals.server.use(`/kb/${gbaiName}/${packageName}/videos`,
express.static(urlJoin('work', gbaiName, filename, 'videos')));

GBServer.globals.server.use(`/${botId}/cache`,
GBServer.globals.server.use(`/${botId}/cache`,
express.static(urlJoin('work', gbaiName, 'cache')));
GBServer.globals.server.use(`/${gbaiName}/${botId}.gbdata/public`,
express.static(urlJoin('work', gbaiName, `${botId}.gbdata`, 'public')));



GBLog.info(`KB (.gbkb) assets accessible at: /kb/${botId}.gbai/${packageName}.`);
Expand Down
9 changes: 4 additions & 5 deletions packages/security.gbapp/services/SecService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,15 @@ export class SecService extends GBService {
const list = process.env.TRANSFER_TO.split(';');
await CollectionUtil.asyncForEach(list, async item => {
if (
!(await this.isAgentSystemId(item)) &&
item !== undefined &&
agentSystemId === undefined &&
item !== userSystemId
!(item !== undefined &&
agentSystemId === undefined &&
item !== userSystemId && await this.isAgentSystemId(item))
) {
// TODO: Optimize loop.
agentSystemId = item;
}
});

await this.updateHumanAgent(userSystemId, instanceId, agentSystemId);

return agentSystemId;
Expand Down

0 comments on commit 660faaf

Please sign in to comment.