Fixed request args
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-06-03 18:06:30 +02:00
parent 9615fb063d
commit ba3a52d7bb
1 changed files with 7 additions and 5 deletions

View File

@ -4,11 +4,11 @@ const smtp = require('../core/smtp');
const config = require('../core/config');
module.exports = app => {
app.get('/api/closure/by-ticket', async function(request, response) {
app.get('/api/closure/by-ticket', async function(req, res) {
});
app.get('/api/closure/all', async function(request, response) {
response.status(200).json({
app.get('/api/closure/all', async function(req, res) {
res.status(200).json({
message: 'Task executed successfully'
});
@ -54,11 +54,13 @@ module.exports = app => {
continue;
}
const args = {
const reqArgs = req.args;
const args = Object.assign({
ticketId: ticket.id,
recipientId: ticket.clientFk,
recipient: ticket.recipient
};
}, reqArgs);
const email = new Email('delivery-note-link', args);
await email.send();
} catch (error) {