Skip to content

Commit

Permalink
fix: removed the unnecessary logger from the agent-service module (#419)
Browse files Browse the repository at this point in the history
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
  • Loading branch information
KulkarniShashank committed Jan 5, 2024
1 parent a5ef36e commit 62e3e40
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions apps/agent-service/src/agent-service.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,6 @@ export class AgentServiceService {
{ headers: { 'authorization': platformAdminSpinnedUp.org_agents[0].apiKey } }
);

this.logger.debug(`API Response Data: ${JSON.stringify(tenantDetails)}`);
return tenantDetails;
}

Expand Down Expand Up @@ -904,7 +903,6 @@ export class AgentServiceService {
};
schemaResponse = await this.commonService.httpPost(url, schemaPayload, { headers: { 'authorization': payload.apiKey } })
.then(async (schema) => {
this.logger.debug(`API Response Data: ${JSON.stringify(schema)}`);
return schema;
})
.catch(error => {
Expand All @@ -925,7 +923,6 @@ export class AgentServiceService {
};
schemaResponse = await this.commonService.httpPost(url, schemaPayload, { headers: { 'authorization': payload.apiKey } })
.then(async (schema) => {
this.logger.debug(`API Response Data: ${JSON.stringify(schema)}`);
return schema;
})
.catch(error => {
Expand All @@ -950,7 +947,6 @@ export class AgentServiceService {
const url = `${payload.agentEndPoint}${CommonConstants.URL_SCHM_GET_SCHEMA_BY_ID.replace('#', `${payload.schemaId}`)}`;
schemaResponse = await this.commonService.httpGet(url, payload.schemaId)
.then(async (schema) => {
this.logger.debug(`API Response Data: ${JSON.stringify(schema)}`);
return schema;
});

Expand All @@ -959,7 +955,6 @@ export class AgentServiceService {

schemaResponse = await this.commonService.httpGet(url, { headers: { 'authorization': payload.apiKey } })
.then(async (schema) => {
this.logger.debug(`API Response Data: ${JSON.stringify(schema)}`);
return schema;
});
}
Expand All @@ -985,7 +980,6 @@ export class AgentServiceService {

credDefResponse = await this.commonService.httpPost(url, credDefPayload, { headers: { 'authorization': payload.apiKey } })
.then(async (credDef) => {
this.logger.debug(`API Response Data: ${JSON.stringify(credDef)}`);
return credDef;
});

Expand All @@ -998,7 +992,6 @@ export class AgentServiceService {
};
credDefResponse = await this.commonService.httpPost(url, credDefPayload, { headers: { 'authorization': payload.apiKey } })
.then(async (credDef) => {
this.logger.debug(`API Response Data: ${JSON.stringify(credDef)}`);
return credDef;
});
}
Expand All @@ -1018,15 +1011,13 @@ export class AgentServiceService {
const url = `${payload.agentEndPoint}${CommonConstants.URL_SCHM_GET_CRED_DEF_BY_ID.replace('#', `${payload.credentialDefinitionId}`)}`;
credDefResponse = await this.commonService.httpGet(url, payload.credentialDefinitionId)
.then(async (credDef) => {
this.logger.debug(`API Response Data: ${JSON.stringify(credDef)}`);
return credDef;
});

} else if (OrgAgentType.SHARED === payload.agentType) {
const url = `${payload.agentEndPoint}${CommonConstants.URL_SHAGENT_GET_CRED_DEF}`.replace('@', `${payload.payload.credentialDefinitionId}`).replace('#', `${payload.tenantId}`);
credDefResponse = await this.commonService.httpGet(url, { headers: { 'authorization': payload.apiKey } })
.then(async (credDef) => {
this.logger.debug(`API Response Data: ${JSON.stringify(credDef)}`);
return credDef;
});
}
Expand Down Expand Up @@ -1151,7 +1142,7 @@ export class AgentServiceService {

try {
const data = await this.commonService
.httpGet(url, { headers: { 'x-api-key': apiKey } })
.httpGet(url, { headers: { 'authorization': apiKey } })
.then(async response => response)
.catch(error => {
this.logger.error(`Error in getConnectionsByconnectionId in agent service : ${JSON.stringify(error)}`);
Expand Down

0 comments on commit 62e3e40

Please sign in to comment.