From cb8b0e9657ba23a7d7a2dcdccf4e2ff72846f865 Mon Sep 17 00:00:00 2001 From: joan Date: Thu, 20 Jan 2022 11:56:04 +0100 Subject: [PATCH] Removed comments --- print/boot.js | 2 -- print/core/report.js | 2 -- print/methods/closure/closure.js | 2 +- print/methods/email/email.js | 33 -------------------------------- 4 files changed, 1 insertion(+), 38 deletions(-) diff --git a/print/boot.js b/print/boot.js index b91bc8c32..d5c06264c 100644 --- a/print/boot.js +++ b/print/boot.js @@ -15,8 +15,6 @@ module.exports = async app => { Intl.NumberFormat = IntlPolyfill.NumberFormat; Intl.DateTimeFormat = IntlPolyfill.DateTimeFormat; - // app.use('/api', require('./methods/router')); - // Init database instance require('./core/database').init(); // Init SMTP Instance diff --git a/print/core/report.js b/print/core/report.js index ddd6c29ee..093f5e99e 100644 --- a/print/core/report.js +++ b/print/core/report.js @@ -42,8 +42,6 @@ class Report extends Component { ] }); - // browser.on('disconnected', launchBrowser); - const page = (await browser.pages())[0]; await page.emulateMedia('screen'); await page.setContent(template); diff --git a/print/methods/closure/closure.js b/print/methods/closure/closure.js index 9e9ef54eb..8cce8237c 100644 --- a/print/methods/closure/closure.js +++ b/print/methods/closure/closure.js @@ -1,5 +1,5 @@ const db = require('vn-print/core/database'); -const Report = require('vn-print/core/report'); // Put inside block to avoid circular dependency +const Report = require('vn-print/core/report'); const Email = require('vn-print/core/email'); const smtp = require('vn-print/core/smtp'); const config = require('vn-print/core/config'); diff --git a/print/methods/email/email.js b/print/methods/email/email.js index d8b55e0dc..5d6882f7d 100644 --- a/print/methods/email/email.js +++ b/print/methods/email/email.js @@ -14,36 +14,3 @@ module.exports = async function(request, response, next) { next(error); } }; - -/* module.exports = app => { - app.get(`/api/email/:name`, async(req, res, next) => { - try { - const reportName = req.params.name; - const email = new Email(reportName, req.args); - - await email.send(); - - res.status(200).json({ - message: 'Sent' - }); - } catch (e) { - next(e); - } - }); - - app.get(`/api/email/:name/preview`, async(req, res, next) => { - try { - const reportName = req.params.name; - const args = req.args; - args.isPreview = true; - - const email = new Email(reportName, args); - const rendered = await email.render(); - - res.send(rendered); - } catch (e) { - next(e); - } - }); -}; - */