diff --git a/apps/connection/src/connection.repository.ts b/apps/connection/src/connection.repository.ts index 834064b0d..946016652 100644 --- a/apps/connection/src/connection.repository.ts +++ b/apps/connection/src/connection.repository.ts @@ -5,7 +5,7 @@ import { agent_invitations, org_agents, platform_config, shortening_url } from ' import { IConnectionSearchCriteria, ICreateConnection, OrgAgent } from './interfaces/connection.interfaces'; import { IUserRequest } from '@credebl/user-request/user-request.interface'; import { IConnectionsListCount, IDeletedConnectionsRecord } from '@credebl/common/interfaces/connection.interface'; -import { SortValue } from '@credebl/enum/enum'; +import { PrismaTables, SortValue } from '@credebl/enum/enum'; // import { OrgAgent } from './interfaces/connection.interfaces'; @Injectable() export class ConnectionRepository { @@ -318,7 +318,7 @@ export class ConnectionRepository { } async deleteConnectionRecordsByOrgId(orgId: string): Promise { - const tablesToCheck = ['credentials', 'presentations']; + const tablesToCheck = [`${PrismaTables.CREDENTIALS}`, `${PrismaTables.PRESENTATIONS}`]; try { return await this.prisma.$transaction(async (prisma) => { diff --git a/libs/enum/src/enum.ts b/libs/enum/src/enum.ts index 7148a0734..570b44ec5 100644 --- a/libs/enum/src/enum.ts +++ b/libs/enum/src/enum.ts @@ -146,6 +146,11 @@ export enum PromiseResult { FULFILLED = 'fulfilled' } +export enum PrismaTables { + PRESENTATIONS = 'presentations', + CREDENTIALS = 'credentials', +} + export enum VerificationProcessState { PROPOSAL_SENT = 'proposal-sent', PROPOSAL_RECEIVED = 'proposal-received',