Fixed request args
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
9615fb063d
commit
ba3a52d7bb
|
@ -4,11 +4,11 @@ const smtp = require('../core/smtp');
|
||||||
const config = require('../core/config');
|
const config = require('../core/config');
|
||||||
|
|
||||||
module.exports = app => {
|
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) {
|
app.get('/api/closure/all', async function(req, res) {
|
||||||
response.status(200).json({
|
res.status(200).json({
|
||||||
message: 'Task executed successfully'
|
message: 'Task executed successfully'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -54,11 +54,13 @@ module.exports = app => {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const args = {
|
const reqArgs = req.args;
|
||||||
|
const args = Object.assign({
|
||||||
ticketId: ticket.id,
|
ticketId: ticket.id,
|
||||||
recipientId: ticket.clientFk,
|
recipientId: ticket.clientFk,
|
||||||
recipient: ticket.recipient
|
recipient: ticket.recipient
|
||||||
};
|
}, reqArgs);
|
||||||
|
|
||||||
const email = new Email('delivery-note-link', args);
|
const email = new Email('delivery-note-link', args);
|
||||||
await email.send();
|
await email.send();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue