Skip to content

Commit

Permalink
fix: change schema validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Reshzera committed Aug 21, 2024
1 parent be9a06f commit 751bdd7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/services/notificationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/validators/segmentAndMetadataValidators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
});

Expand Down
2 changes: 1 addition & 1 deletion src/validators/schemaValidators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 751bdd7

Please sign in to comment.