diff --git a/src/routes/v1/notificationRouter.test.ts b/src/routes/v1/notificationRouter.test.ts index 0bb403d..5aab98f 100644 --- a/src/routes/v1/notificationRouter.test.ts +++ b/src/routes/v1/notificationRouter.test.ts @@ -2177,6 +2177,7 @@ function sendNotificationTestCases() { segment: { payload: { email: 'aliebrahimi2079@gmail.com', + userId: 1234, ownerName: 'Ali', projectName: 'Test Project', }, @@ -2203,6 +2204,7 @@ function sendNotificationTestCases() { segment: { payload: { email: 'aliebrahimi2079@gmail.com', + userId: 1234, ownerName: 'Ali', projectName: 'Test Project', invalidField: 'invalid data', @@ -2237,6 +2239,7 @@ function sendNotificationTestCases() { segment: { payload: { email: 'aliebrahimi2079@gmail.com', + userId: 1234, ownerName: 'Ali', projectName: 'Test Project', }, @@ -2264,6 +2267,7 @@ function sendNotificationTestCases() { payload: { email: 'aliebrahimi2079@gmail.com', ownerName: 'Ali', + userId: 1234, projectName: 'Test Project', invalidField: 'invalid data', }, diff --git a/src/utils/validators/segmentAndMetadataValidators.ts b/src/utils/validators/segmentAndMetadataValidators.ts index 988a66e..eeb7b44 100644 --- a/src/utils/validators/segmentAndMetadataValidators.ts +++ b/src/utils/validators/segmentAndMetadataValidators.ts @@ -177,6 +177,7 @@ const notifyRewardAmountSegmentSchema = Joi.object({ const projectOwnershipChangedSegmentSchema = Joi.object({ email: Joi.string().required(), + userId: Joi.number().required(), ownerName: Joi.string().required(), projectName: Joi.string().required(), });