Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.toNotify.forEach(reimb => {
if (!reimb.cozyMetadata) {
reimb.cozyMetadata = {}
}
if (!reimb.cozyMetadata.notifications) {
reimb.cozyMetadata.notifications = {}
}
const today = new Date()
reimb.cozyMetadata.notifications[LateHealthReimbursement.settingKey] = [
today.toISOString()
]
})
await BankTransaction.updateAll(this.toNotify)
}
}