Fixes. Reimplementation of the API transaction sender.
This commit is contained in:
parent
a22187ef12
commit
8606652101
13 changed files with 350 additions and 276 deletions
|
@ -310,11 +310,14 @@ router.postAsync('/templates/:templateId/send', async (req, res) => {
|
|||
}
|
||||
|
||||
const emails = input.EMAIL.split(',');
|
||||
const mergeTags = input.TAGS || {};
|
||||
const subject = input.SUBJECT || '';
|
||||
const attachments = input.ATTACHMENTS || [];
|
||||
|
||||
// TODO: attachments: input.ATTACHMENTS || []
|
||||
const info = await templates.sendAsTransactionalEmail(req.context, templateId, sendConfigurationId, emails, input.SUBJECT, input.VARIABLES);
|
||||
|
||||
res.json({ data: info });
|
||||
const result = await templates.sendAsTransactionalEmail(req.context, templateId, sendConfigurationId, emails, subject, mergeTags, attachments);
|
||||
|
||||
res.json({ data: result });
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue