How to use the cozy-doctypes.BankTransaction.updateAll function in cozy-doctypes

To help you get started, we’ve selected a few cozy-doctypes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cozy / cozy.github.io / en / cozy-banks / src / ducks / notifications / LateHealthReimbursement / index.js View on Github external
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)
  }
}