Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed the unnecessary logger from the agent-service module #419

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading