backend-manager 2.3.15 → 2.3.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "2.3.15",
3
+ "version": "2.3.16",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -66,4 +66,4 @@
66
66
  "src/",
67
67
  "templates/"
68
68
  ]
69
- }
69
+ }
@@ -16,6 +16,7 @@ Module.prototype.main = function () {
16
16
 
17
17
  let uid = payload.data.payload.uid;
18
18
  const app = payload.data.payload.appId || payload.data.payload.app || Manager.config.app.id;
19
+ let config = payload.data.payload.config || {};
19
20
 
20
21
  let uuid = null;
21
22
  let error;
@@ -62,6 +63,12 @@ Module.prototype.main = function () {
62
63
  return reject(error)
63
64
  }
64
65
 
66
+ if (config.backendManagerKey === Manager.config.backend_manager.key && Manager.config.backend_manager.key) {
67
+ assistant.log('Validated config', config, {environment: 'production'})
68
+ } else {
69
+ config = {};
70
+ }
71
+
65
72
  // Fetch app details
66
73
  await fetch('https://us-central1-itw-creative-works.cloudfunctions.net/getApp', {
67
74
  method: 'post',
@@ -81,6 +88,7 @@ Module.prototype.main = function () {
81
88
  ip: assistant.request.ip,
82
89
  country: assistant.request.country,
83
90
  app: result,
91
+ config: config,
84
92
  }
85
93
  });
86
94
  })