Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const validationWithSuccessFeedback = ({ trigger, schema, body, errors }) => {
if (body.status === 'OK' && trigger.type === 'healthcheck') {
props.onNotification({
id: `healthcheck_${new Date().getTime()}`,
title: 'Success',
message: body.comment || `Trigger ${trigger.type} / ${trigger.family} / ${trigger.action} succeeded`,
});
}
return service.validation({ schema, body, errors });
};
const registry = {