Started adding timezone support
This commit is contained in:
parent
33e075ecdc
commit
478237e60f
14 changed files with 191 additions and 9 deletions
|
@ -230,7 +230,7 @@ module.exports.insert = (listId, meta, subscription, callback) => {
|
|||
let keys = [];
|
||||
let values = [];
|
||||
|
||||
let allowedKeys = ['first_name', 'last_name'];
|
||||
let allowedKeys = ['first_name', 'last_name', 'tz'];
|
||||
Object.keys(subscription).forEach(key => {
|
||||
let value = subscription[key];
|
||||
key = tools.toDbKey(key);
|
||||
|
@ -392,7 +392,8 @@ module.exports.getWithMergeTags = (listId, cid, callback) => {
|
|||
EMAIL: subscription.email,
|
||||
FIRST_NAME: subscription.firstName,
|
||||
LAST_NAME: subscription.lastName,
|
||||
FULL_NAME: [].concat(subscription.firstName || []).concat(subscription.lastName || []).join(' ')
|
||||
FULL_NAME: [].concat(subscription.firstName || []).concat(subscription.lastName || []).join(' '),
|
||||
TIMEZONE: subscription.tz || ''
|
||||
};
|
||||
|
||||
fields.getRow(fieldList, subscription, true, true).forEach(field => {
|
||||
|
@ -433,7 +434,7 @@ module.exports.update = (listId, cid, updates, allowEmail, callback) => {
|
|||
return callback(err);
|
||||
}
|
||||
|
||||
let allowedKeys = ['first_name', 'last_name'];
|
||||
let allowedKeys = ['first_name', 'last_name', 'tz'];
|
||||
|
||||
if (allowEmail) {
|
||||
allowedKeys.unshift('email');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue