web-manager 2.1.36 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +6 -28
- package/lib/account.js +2 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -240,23 +240,15 @@ function Manager() {
|
|
240
240
|
user.getIdToken(false)
|
241
241
|
.then(function(token) {
|
242
242
|
var done;
|
243
|
-
|
244
|
-
// method: 'POST',
|
245
|
-
// body: JSON.stringify({
|
246
|
-
// authenticationToken: token,
|
247
|
-
// command: 'signup-handler',
|
248
|
-
// payload: {
|
249
|
-
// newsletterSignUp: domLib.select('.auth-newsletter-input').getValue(),
|
250
|
-
// affiliateCode: This.storage().get('auth.affiliateCode', '')
|
251
|
-
// }
|
252
|
-
// }),
|
253
|
-
// })
|
254
|
-
fetch('https://us-central1-' + This.properties.options.libraries.firebase_app.config.projectId + '.cloudfunctions.net/bm_signUpHandler', {
|
243
|
+
fetch('https://us-central1-' + This.properties.options.libraries.firebase_app.config.projectId + '.cloudfunctions.net/bm_api', {
|
255
244
|
method: 'POST',
|
256
245
|
body: JSON.stringify({
|
257
246
|
authenticationToken: token,
|
258
|
-
|
259
|
-
|
247
|
+
command: 'user:sign-up',
|
248
|
+
payload: {
|
249
|
+
newsletterSignUp: domLib.select('.auth-newsletter-input').getValue(),
|
250
|
+
affiliateCode: This.storage().get('auth.affiliateCode', ''),
|
251
|
+
}
|
260
252
|
}),
|
261
253
|
})
|
262
254
|
.catch(function () {})
|
@@ -274,20 +266,6 @@ function Manager() {
|
|
274
266
|
}
|
275
267
|
}, 5000);
|
276
268
|
|
277
|
-
// This.ajax().request({
|
278
|
-
// url: 'https://us-central1-' + This.properties.options.libraries.firebase_app.config.projectId + '.cloudfunctions.net/bm_signUpHandler',
|
279
|
-
// // url: 'http://localhost:5001/ultimate-jekyll/us-central1/bm_signUpHandler',
|
280
|
-
// body: {
|
281
|
-
// authenticationToken: token,
|
282
|
-
// newsletterSignUp: domLib.select('.auth-newsletter-input').getValue(),
|
283
|
-
// affiliateCode: This.storage().get('auth.affiliateCode', '')
|
284
|
-
// },
|
285
|
-
// timeout: 5000,
|
286
|
-
// })
|
287
|
-
// .always(function (response, status) {
|
288
|
-
// // This.storage().set('notifications.lastSynced', new Date(0).toISOString())
|
289
|
-
// _authHandle_in_normal(This, user);
|
290
|
-
// });
|
291
269
|
})
|
292
270
|
.catch(function(error) {
|
293
271
|
console.error(error);
|
package/lib/account.js
CHANGED
@@ -214,7 +214,8 @@ Account.prototype._resolveAccount = function (currentUser, account, options) {
|
|
214
214
|
account.plan.expires = account.plan.expires || {};
|
215
215
|
account.plan.expires.timestamp = new Date(account.plan.expires.timestamp || 0).toISOString();
|
216
216
|
account.plan.expires.timestampUNIX = Math.round(new Date(account.plan.expires.timestamp || 0).getTime() / 1000);
|
217
|
-
account.plan.
|
217
|
+
account.plan.limits = account.plan.limits || {};
|
218
|
+
// account.plan.devices = account.plan.devices || 1;
|
218
219
|
|
219
220
|
account.plan.payment = account.plan.payment || {};
|
220
221
|
account.plan.payment.startDate = account.plan.payment.startDate || {};
|
package/package.json
CHANGED