@engage_so/core
Advanced tools
Comparing version 1.4.0 to 1.4.1
12
index.js
@@ -80,3 +80,3 @@ const fetch = require('cross-fetch') | ||
} | ||
const allowed = ['id', 'email', 'number', 'created_at', 'device_token', 'device_platform', 'first_name', 'last_name'] | ||
const allowed = ['id', 'is_group', 'email', 'number', 'created_at', 'device_token', 'device_platform', 'first_name', 'last_name'] | ||
const params = { | ||
@@ -86,3 +86,3 @@ meta: {} | ||
for (const k in o) { | ||
if (allowed.indexOf(k) !== -1) { | ||
if (allowed.includes(k)) { | ||
params[k] = o[k] | ||
@@ -107,9 +107,9 @@ } else { | ||
} | ||
const notMeta = ['created_at', 'number', 'device_token', 'device_platform', 'email', 'first_name', 'last_name'] | ||
const notMeta = ['created_at', 'is_group', 'number', 'device_token', 'device_platform', 'email', 'first_name', 'last_name'] | ||
const params = { meta: {} } | ||
for (const k in data) { | ||
if (notMeta.indexOf(k) === -1) { | ||
if (notMeta.includes(k)) { | ||
params[k] = data[k] | ||
} else { | ||
params.meta[k] = data[k] | ||
} else { | ||
params[k] = data[k] | ||
} | ||
@@ -116,0 +116,0 @@ } |
{ | ||
"name": "@engage_so/core", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Event driven customer segmentation and targeted engagement.", | ||
@@ -21,3 +21,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "243019a68a3906c5cc2faa5c5227e4d497ee8a50" | ||
"gitHead": "7fc22abf94ef02987964ecfb6c3871314e42f922" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5384