File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1748,7 +1748,6 @@ export class AgentServiceService {
1748
1748
throw new InternalServerErrorException ( `Failed to get agent information: ${ orgAgentResult . reason } ` ) ;
1749
1749
}
1750
1750
1751
- const getApiKey = getApiKeyResult ?. value ;
1752
1751
const orgAgent = orgAgentResult ?. value ;
1753
1752
1754
1753
const orgAgentTypeResult = await this . agentServiceRepository . getOrgAgentType ( orgAgent . orgAgentTypeId ) ;
@@ -1757,6 +1756,17 @@ export class AgentServiceService {
1757
1756
throw new NotFoundException ( ResponseMessages . agent . error . orgAgentNotFound ) ;
1758
1757
}
1759
1758
1759
+ let getApiKey ;
1760
+ if ( OrgAgentType . SHARED ) {
1761
+ const platformAdminSpinnedUp = await this . agentServiceRepository . platformAdminAgent (
1762
+ CommonConstants . PLATFORM_ADMIN_ORG
1763
+ ) ;
1764
+
1765
+ getApiKey = await this . commonService . decryptPassword ( platformAdminSpinnedUp ?. org_agents [ 0 ] . apiKey ) ;
1766
+ } else {
1767
+ getApiKey = getApiKeyResult ?. value ;
1768
+ }
1769
+
1760
1770
// Determine the URL based on the agent type
1761
1771
const url =
1762
1772
orgAgentTypeResult . agent === OrgAgentType . SHARED
You can’t perform that action at this time.
0 commit comments