Commit af5e68da authored by Daniel Caillibaud's avatar Daniel Caillibaud

code style

parent e1673c9e
......@@ -206,22 +206,18 @@ function sendMailToFormateurs (structure, purgeWanted, callback) {
const $utilisateur = lassi.service('$utilisateur')
const appName = config.application.name
flow()
.seq(function () {
$mail.setup(this)
})
.seq(function () {
$utilisateur.grabTeacherByStructure(structure.oid, this)
})
.seqEach(function (utilisateur) {
const mailData = {
to: utilisateur.mail,
subject: 'Purge de l’établissement',
text: getMailTextPurgeReport({ appName, utilisateur, structure, purgeWanted })
}
$mail.sendMail(mailData, this)
})
.done(callback)
flow().seq(function () {
$mail.setup(this)
}).seq(function () {
$utilisateur.grabTeacherByStructure(structure.oid, this)
}).seqEach(function (utilisateur) {
const mailData = {
to: utilisateur.mail,
subject: 'Purge de l’établissement',
text: getMailTextPurgeReport({ appName, utilisateur, structure, purgeWanted })
}
$mail.sendMail(mailData, this)
}).done(callback)
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment