Skip to content

Commit 5c65fb2

Browse files
CCM-11097: Event Validation
1 parent eee26d2 commit 5c65fb2

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

  • infrastructure/modules/eventpub/lambda/eventpub/src

infrastructure/modules/eventpub/lambda/eventpub/src/index.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,6 @@ function validateEvent(event) {
3030
if (!requiredFields.every(field => event.hasOwnProperty(field))) {
3131
return false;
3232
}
33-
// Check nested data object and its required fields
34-
const dataRequiredFields = [
35-
'nhsNumber',
36-
'delayedFallback',
37-
'sendingGroupId',
38-
'clientId',
39-
'campaignId',
40-
'supplierStatus',
41-
'previousSupplierStatus'
42-
];
43-
if (
44-
typeof event.data !== 'object' ||
45-
!dataRequiredFields.every(field => event.data.hasOwnProperty(field))
46-
) {
47-
return false;
48-
}
4933
return true;
5034
}
5135

0 commit comments

Comments
 (0)