Support for custom HTML editors

This commit is contained in:
witzig 2017-03-02 18:52:40 +01:00
parent 78d262ac8d
commit a11d95f3d7
22 changed files with 255 additions and 133 deletions

View file

@ -13,7 +13,7 @@ let log = require('npmlog');
let mailer = require('../mailer');
let humanize = require('humanize');
let allowedKeys = ['description', 'from', 'address', 'reply_to', 'subject', 'template', 'source_url', 'list', 'segment', 'html', 'text', 'tracking_disabled'];
let allowedKeys = ['description', 'from', 'address', 'reply_to', 'subject', 'editor_name', 'editor_data', 'template', 'source_url', 'list', 'segment', 'html', 'text', 'tracking_disabled'];
module.exports.list = (start, limit, callback) => {
db.getConnection((err, connection) => {
@ -729,6 +729,8 @@ module.exports.create = (campaign, opts, callback) => {
return callback(new Error('Selected template not found'));
}
campaign.editorName = template.editorName;
campaign.editorData = template.editorData;
campaign.html = template.html;
campaign.text = template.text;