web-manager 2.1.35 → 3.0.0
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 +3 -2
- package/package.json +2 -2
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
@@ -277,8 +277,9 @@ Account.prototype._resolveAccount = function (currentUser, account, options) {
|
|
277
277
|
account.activity.created.timestampUNIX = account.activity.created.timestampUNIX || 0;
|
278
278
|
|
279
279
|
// Api
|
280
|
-
account.
|
281
|
-
account.
|
280
|
+
account.api = account.api || {};
|
281
|
+
account.api.clientId = account.api.clientId || 'unknown';
|
282
|
+
account.api.privateKey = account.api.privateKey || 'unknown';
|
282
283
|
|
283
284
|
// Set UI elements
|
284
285
|
try {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "web-manager",
|
3
|
-
"version": "
|
3
|
+
"version": "3.0.0",
|
4
4
|
"description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -28,4 +28,4 @@
|
|
28
28
|
"firebase": "^8.10.1",
|
29
29
|
"lazysizes": "^5.3.2"
|
30
30
|
}
|
31
|
-
}
|
31
|
+
}
|