Encode List-ID header, allow access to campaigns with deleted list

This commit is contained in:
Andris Reinman 2016-08-10 20:45:29 +03:00
parent 0b6d549af4
commit fb7fd7238f
4 changed files with 29 additions and 21 deletions

View file

@ -465,10 +465,9 @@ module.exports.create = (campaign, opts, callback) => {
if (err) {
return callback(err);
}
if (!list) {
return callback(new Error('Selected list not found'));
}
return callback(null, list);
return callback(null, list || {
id: listId
});
});
};
@ -649,10 +648,9 @@ module.exports.update = (id, updates, callback) => {
if (err) {
return callback(err);
}
if (!list) {
return callback(new Error('Selected list not found'));
}
return callback(null, list);
return callback(null, list || {
id: listId
});
});
};