diff --git a/back/models/account.js b/back/models/account.js index c2502380a..6d71a4e52 100644 --- a/back/models/account.js +++ b/back/models/account.js @@ -131,7 +131,7 @@ module.exports = Self => { WHERE u.id = ?`, [userId], options); let roles = []; - for (role of result) + for (const role of result) roles.push(role.name); return roles; diff --git a/modules/invoiceOut/back/methods/invoiceOut/download.js b/modules/invoiceOut/back/methods/invoiceOut/download.js index 74f5c95fe..5c787428b 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/download.js +++ b/modules/invoiceOut/back/methods/invoiceOut/download.js @@ -65,7 +65,7 @@ module.exports = Self => { try { await fs.access(file.path); } catch (error) { - await Self.createPdf(ctx, id); + await Self.createPdf(ctx, id, myOptions); } const stream = fs.createReadStream(file.path);