v1.18.0
This commit is contained in:
parent
6c34091634
commit
95379f731f
17 changed files with 187 additions and 99 deletions
|
@ -13,7 +13,7 @@ let log = require('npmlog');
|
|||
let mailer = require('../mailer');
|
||||
let caches = require('../caches');
|
||||
|
||||
let allowedKeys = ['description', 'from', 'address', 'subject', 'template', 'source_url', 'list', 'segment', 'html', 'text'];
|
||||
let allowedKeys = ['description', 'from', 'address', 'subject', 'template', 'source_url', 'list', 'segment', 'html', 'text', 'tracking_disabled'];
|
||||
|
||||
module.exports.list = (start, limit, callback) => {
|
||||
db.getConnection((err, connection) => {
|
||||
|
@ -417,6 +417,8 @@ module.exports.create = (campaign, opts, callback) => {
|
|||
campaign = tools.convertKeys(campaign);
|
||||
let name = (campaign.name || '').toString().trim();
|
||||
|
||||
campaign.trackingDisabled = campaign.trackingDisabled ? 1 : 0;
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
if (/^\d+:\d+$/.test(campaign.list)) {
|
||||
|
@ -631,6 +633,8 @@ module.exports.update = (id, updates, callback) => {
|
|||
let campaign = tools.convertKeys(updates);
|
||||
let name = (campaign.name || '').toString().trim();
|
||||
|
||||
campaign.trackingDisabled = campaign.trackingDisabled ? 1 : 0;
|
||||
|
||||
if (!name) {
|
||||
return callback(new Error('Campaign Name must be set'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue