fix(security.gbalib): Transfer issues fixed.
This commit is contained in:
parent
64d9884b69
commit
660faafb53
2 changed files with 8 additions and 7 deletions
|
@ -831,9 +831,11 @@ export class GBDeployer implements IGBDeployer {
|
||||||
express.static(urlJoin('work', gbaiName, filename, 'audios')));
|
express.static(urlJoin('work', gbaiName, filename, 'audios')));
|
||||||
GBServer.globals.server.use(`/kb/${gbaiName}/${packageName}/videos`,
|
GBServer.globals.server.use(`/kb/${gbaiName}/${packageName}/videos`,
|
||||||
express.static(urlJoin('work', gbaiName, filename, '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')));
|
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}.`);
|
GBLog.info(`KB (.gbkb) assets accessible at: /kb/${botId}.gbai/${packageName}.`);
|
||||||
|
|
|
@ -193,16 +193,15 @@ export class SecService extends GBService {
|
||||||
const list = process.env.TRANSFER_TO.split(';');
|
const list = process.env.TRANSFER_TO.split(';');
|
||||||
await CollectionUtil.asyncForEach(list, async item => {
|
await CollectionUtil.asyncForEach(list, async item => {
|
||||||
if (
|
if (
|
||||||
!(await this.isAgentSystemId(item)) &&
|
!(item !== undefined &&
|
||||||
item !== undefined &&
|
agentSystemId === undefined &&
|
||||||
agentSystemId === undefined &&
|
item !== userSystemId && await this.isAgentSystemId(item))
|
||||||
item !== userSystemId
|
|
||||||
) {
|
) {
|
||||||
// TODO: Optimize loop.
|
// TODO: Optimize loop.
|
||||||
agentSystemId = item;
|
agentSystemId = item;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.updateHumanAgent(userSystemId, instanceId, agentSystemId);
|
await this.updateHumanAgent(userSystemId, instanceId, agentSystemId);
|
||||||
|
|
||||||
return agentSystemId;
|
return agentSystemId;
|
||||||
|
|
Loading…
Add table
Reference in a new issue