Skip to content

Commit

Permalink
fix: removed duplicate code and other changes which got merged in res…
Browse files Browse the repository at this point in the history
…olving conflicts
  • Loading branch information
RinkalBhojani committed Sep 10, 2024
1 parent 2e639f9 commit d648c61
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 42 deletions.
12 changes: 0 additions & 12 deletions apps/agent-service/src/agent-service.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1915,16 +1915,4 @@ export class AgentServiceService {
}
}

async sendBasicMessage(questionPayload: IBasicMessage, url: string, orgId: string): Promise<object> {
try {
const getApiKey = await this.getOrgAgentApiKey(orgId);
const sendQuestionRes = await this.commonService
.httpPost(url, questionPayload, { headers: { authorization: getApiKey } })
.then(async (response) => response);
return sendQuestionRes;
} catch (error) {
this.logger.error(`Error in sendBasicMessage in agent service : ${JSON.stringify(error)}`);
throw error;
}
}
}
11 changes: 0 additions & 11 deletions apps/api-gateway/src/connection/dtos/question-answer.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,4 @@ export class QuestionAnswerWebhookDto {
@IsOptional()
type: string;

}

export class BasicMessageDto {
@ApiPropertyOptional()
@IsOptional()
@IsString({ message: 'content must be a string' })
@IsNotEmpty({ message: 'please provide valid content' })
content: string;

orgId: string;
connectionId: string;
}
1 change: 0 additions & 1 deletion apps/connection/src/connection.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { getNatsOptions } from '@credebl/common/nats.config';
import { UserActivityRepository } from 'libs/user-activity/repositories';
import { CommonConstants } from '@credebl/common/common.constant';
// import { nkeyAuthenticator } from 'nats';
import { CommonConstants } from '@credebl/common/common.constant';

@Module({
imports: [
Expand Down
16 changes: 1 addition & 15 deletions apps/connection/src/connection.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,22 +649,8 @@ export class ConnectionService {
if (!agentDetails) {
throw new NotFoundException(ResponseMessages.connection.error.agentEndPointNotFound);
}

let legacyinvitationDid;
if (IsReuseConnection) {
const data: agent_invitations[] = await this.connectionRepository.getInvitationDidByOrgId(orgId);
if (data && 0 < data.length) {
const [firstElement] = data;
legacyinvitationDid = firstElement?.invitationDid ?? undefined;

this.logger.log('legacyinvitationDid:', legacyinvitationDid);
}
}
const connectionInvitationDid = invitationDid ? invitationDid : legacyinvitationDid;

this.logger.log('connectionInvitationDid:', connectionInvitationDid);


this.logger.log(`logoUrl:::, ${organisation.logoUrl}`);
let legacyinvitationDid;
if (IsReuseConnection) {
const data: agent_invitations[] = await this.connectionRepository.getInvitationDidByOrgId(orgId);
Expand Down
2 changes: 0 additions & 2 deletions apps/organization/src/organization.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import { CacheModule } from '@nestjs/cache-manager';
import { getNatsOptions } from '@credebl/common/nats.config';
import { ClientRegistrationService } from '@credebl/client-registration';
import { KeycloakUrlService } from '@credebl/keycloak-url';
import { CommonConstants } from '@credebl/common/common.constant';

import { AwsService } from '@credebl/aws';
import { CommonConstants } from '@credebl/common/common.constant';
@Module({
Expand Down
1 change: 0 additions & 1 deletion libs/common/src/nats.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NATSReconnects } from '@credebl/enum/enum';
import { Authenticator, nkeyAuthenticator } from 'nats';
import { CommonConstants } from './common.constant';

export const getNatsOptions = (
serviceName: string, nkeySeed?: string
Expand Down

0 comments on commit d648c61

Please sign in to comment.