diff --git a/src/services/notificationService.ts b/src/services/notificationService.ts index 4a0e20c..409a35d 100644 --- a/src/services/notificationService.ts +++ b/src/services/notificationService.ts @@ -41,7 +41,7 @@ export const activityCreator = ( case NOTIFICATIONS_EVENT_NAMES.SEND_EMAIL_CONFIRMATION_CODE_FLOW: attributes = { 'str:cm:email': payload.email, - 'int:cm:code': payload.verificationCode, + 'int:cm:code': Number(payload.verificationCode), 'str:cm:userid': payload.userId?.toString(), }; break; diff --git a/src/utils/validators/segmentAndMetadataValidators.ts b/src/utils/validators/segmentAndMetadataValidators.ts index 36dc806..95187e3 100644 --- a/src/utils/validators/segmentAndMetadataValidators.ts +++ b/src/utils/validators/segmentAndMetadataValidators.ts @@ -164,7 +164,7 @@ const sendEmailConfirmationSchema = Joi.object({ const sendEmailConfirmationCodeFlowSchema = Joi.object({ email: Joi.string().required(), - verificationCode: Joi.number().required(), + verificationCode: Joi.string().required(), userId: Joi.number().required(), }); diff --git a/src/validators/schemaValidators.ts b/src/validators/schemaValidators.ts index d4f3b2d..bd7b2c3 100644 --- a/src/validators/schemaValidators.ts +++ b/src/validators/schemaValidators.ts @@ -57,7 +57,7 @@ export const sendNotificationValidator = Joi.object({ slug: Joi.string(), firstName: Joi.string().allow(null).allow(''), userId: Joi.number(), - verificationCode: Joi.number().allow(null).allow(''), + verificationCode: Joi.string().allow(null).allow(''), projectLink: Joi.string().allow(null).allow(''), // Email confirmation