web-manager 3.1.30 → 3.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -1
- package/lib/account.js +11 -0
- package/package.json +1 -1
package/index.js
CHANGED
@@ -244,6 +244,7 @@ function Manager() {
|
|
244
244
|
user.getIdToken(false)
|
245
245
|
.then(function(token) {
|
246
246
|
var done;
|
247
|
+
|
247
248
|
fetch('https://us-central1-' + This.properties.options.libraries.firebase_app.config.projectId + '.cloudfunctions.net/bm_api', {
|
248
249
|
method: 'POST',
|
249
250
|
body: JSON.stringify({
|
@@ -252,7 +253,7 @@ function Manager() {
|
|
252
253
|
payload: {
|
253
254
|
newsletterSignUp: select('.auth-newsletter-input').getValue(),
|
254
255
|
affiliateCode: This.storage().get('auth.affiliateCode', ''),
|
255
|
-
}
|
256
|
+
},
|
256
257
|
}),
|
257
258
|
})
|
258
259
|
.catch(function () {})
|
package/lib/account.js
CHANGED
@@ -328,6 +328,17 @@ Account.prototype._resolveAccount = function (firebaseUser, account, options) {
|
|
328
328
|
account.activity.created.timestamp = account.activity.created.timestamp || '1970-01-01T00:00:00.000Z';
|
329
329
|
account.activity.created.timestampUNIX = account.activity.created.timestampUNIX || 0;
|
330
330
|
|
331
|
+
account.activity.geolocation = account.activity.geolocation || {};
|
332
|
+
account.activity.geolocation.ip = account.activity.geolocation.ip || 'unknown';
|
333
|
+
account.activity.geolocation.continent = account.activity.geolocation.continent || 'unknown';
|
334
|
+
account.activity.geolocation.country = account.activity.geolocation.country || 'unknown';
|
335
|
+
account.activity.geolocation.city = account.activity.geolocation.city || 'unknown';
|
336
|
+
account.activity.geolocation.latitude = account.activity.geolocation.latitude || 'unknown';
|
337
|
+
account.activity.geolocation.longitude = account.activity.geolocation.longitude || 'unknown';
|
338
|
+
account.activity.geolocation.userAgent = account.activity.geolocation.userAgent || 'unknown';
|
339
|
+
account.activity.geolocation.language = account.activity.geolocation.language || 'unknown';
|
340
|
+
account.activity.geolocation.platform = account.activity.geolocation.platform || 'unknown';
|
341
|
+
|
331
342
|
// Api
|
332
343
|
account.api = account.api || {};
|
333
344
|
account.api.clientId = account.api.clientId || 'unknown';
|
package/package.json
CHANGED