Removed comments
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e3795ea072
commit
cb8b0e9657
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
};
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue