Skip to content

Commit 9efb49e

Browse files
fix: add declined column in proof webhook (#1088)
* fix: added column in proof webhook Signed-off-by: pranalidhanavade <[email protected]> * fix: Added message for for proof decline Signed-off-by: Tipu_Singh <[email protected]> --------- Signed-off-by: pranalidhanavade <[email protected]> Signed-off-by: Tipu_Singh <[email protected]> Co-authored-by: pranalidhanavade <[email protected]>
1 parent 5299c72 commit 9efb49e

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

apps/api-gateway/src/verification/dto/webhook-proof.dto.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,8 @@ export class WebhookPresentationProofDto {
7272
@ApiPropertyOptional()
7373
@IsOptional()
7474
orgId: string;
75+
76+
@ApiPropertyOptional()
77+
@IsOptional()
78+
errorMessage: string;
7579
}

apps/verification/src/interfaces/verification.interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ export interface IWebhookProofPresentation {
210210
updatedAt: string;
211211
isVerified: boolean;
212212
contextCorrelationId: string;
213+
errorMessage?: string;
213214
}
214215

215216
export interface IProofPresentation {

apps/verification/src/repositories/verification.repository.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class VerificationRepository {
127127
let encryptEmailId;
128128
let organisationId: string;
129129
let schemaId;
130-
130+
131131
const { proofPresentationPayload, orgId } = payload;
132132

133133
//For Educreds
@@ -161,7 +161,8 @@ export class VerificationRepository {
161161
isVerified: proofPresentationPayload.isVerified,
162162
lastChangedBy: organisationId,
163163
connectionId: proofPresentationPayload.connectionId,
164-
emailId: encryptEmailId
164+
emailId: encryptEmailId,
165+
errorMessage: proofPresentationPayload.errorMessage
165166
},
166167
create: {
167168
connectionId: proofPresentationPayload.connectionId,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- AlterTable
2+
ALTER TABLE "presentations" ADD COLUMN "errorMessage" VARCHAR;

libs/prisma-service/prisma/schema.prisma

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ model presentations {
354354
isVerified Boolean?
355355
presentationId String?
356356
schemaId String? @db.VarChar
357+
errorMessage String? @db.VarChar
357358
emailId String?
358359
orgId String? @db.Uuid
359360
organisation organisation? @relation(fields: [orgId], references: [id])

0 commit comments

Comments
 (0)