From 3b096fd91b86e8c8a93cb504b628bb2a329bae9a Mon Sep 17 00:00:00 2001 From: Ramin Date: Tue, 25 Jun 2024 18:37:08 +0330 Subject: [PATCH] User Story - Rejected project owner reason --- src/services/notificationService.ts | 1 + src/utils/validators/segmentAndMetadataValidators.ts | 1 + src/validators/schemaValidators.ts | 3 +++ 3 files changed, 5 insertions(+) diff --git a/src/services/notificationService.ts b/src/services/notificationService.ts index 3b159aa..ab0524d 100644 --- a/src/services/notificationService.ts +++ b/src/services/notificationService.ts @@ -126,6 +126,7 @@ const activityCreator = (payload: any, orttoEventName: NOTIFICATIONS_EVENT_NAMES "str:cm:email": payload.email, "str:cm:projectlink": payload.projectLink, "str:cm:verified-status": 'rejected', + "txt:cm:reason": payload.verificationRejectedReason, "str:cm:userid": payload.userId?.toString(), }; break diff --git a/src/utils/validators/segmentAndMetadataValidators.ts b/src/utils/validators/segmentAndMetadataValidators.ts index c932ca1..a755a44 100644 --- a/src/utils/validators/segmentAndMetadataValidators.ts +++ b/src/utils/validators/segmentAndMetadataValidators.ts @@ -30,6 +30,7 @@ const projectRelatedTrackerSchema = Joi.object({ slug: Joi.string().required(), projectLink: Joi.string().allow(null).allow(''), + verificationRejectedReason: Joi.string().allow(null, ''), // it's for project updates update: Joi.string().allow(null, ''), }); diff --git a/src/validators/schemaValidators.ts b/src/validators/schemaValidators.ts index 7540433..3544a1b 100644 --- a/src/validators/schemaValidators.ts +++ b/src/validators/schemaValidators.ts @@ -60,6 +60,9 @@ export const sendNotificationValidator = Joi.object({ userId: Joi.number(), projectLink: Joi.string().allow(null).allow(''), + // Verification form + verificationRejectedReason: Joi.string().allow(null, ''), + // Donation related attributes amount: Joi.number(), token: Joi.string().allow(null, ''),