backend-manager 2.4.21 → 2.4.24
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
|
@@ -29,7 +29,7 @@ Module.prototype.init = function (Manager, data) {
|
|
|
29
29
|
self.assistant.request.data.payload = self.assistant.request.data.payload || {};
|
|
30
30
|
|
|
31
31
|
if (Manager.options.log) {
|
|
32
|
-
self.assistant.log(`Executing (log): ${resolved.command}`, self.assistant.request
|
|
32
|
+
self.assistant.log(`Executing (log): ${resolved.command}`, self.assistant.request, JSON.stringify(self.assistant.request), {environment: 'production'})
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
return self;
|
|
@@ -13,12 +13,12 @@ Module.prototype.init = function (Manager, payload) {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
Module.prototype.main = function () {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const user = self.user;
|
|
16
|
+
const self = this;
|
|
17
|
+
const libraries = self.libraries;
|
|
18
|
+
const assistant = self.assistant;
|
|
19
|
+
const user = self.user;
|
|
21
20
|
|
|
21
|
+
return new Promise(async function(resolve, reject) {
|
|
22
22
|
const analytics = self.Manager.Analytics({
|
|
23
23
|
assistant: assistant,
|
|
24
24
|
uuid: user.uid,
|
package/src/manager/index.js
CHANGED
|
@@ -400,6 +400,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
400
400
|
Manager.prototype._process = function (mod) {
|
|
401
401
|
const self = this;
|
|
402
402
|
const name = mod.assistant.meta.name;
|
|
403
|
+
const method = mod.assistant.request.method;
|
|
403
404
|
const hook = self.handlers && self.handlers[name];
|
|
404
405
|
const req = mod.req;
|
|
405
406
|
const res = mod.res;
|
|
@@ -407,6 +408,11 @@ Manager.prototype._process = function (mod) {
|
|
|
407
408
|
return new Promise(async function(resolve, reject) {
|
|
408
409
|
let error;
|
|
409
410
|
|
|
411
|
+
console.log('---REQ', method, mod.assistant.request);
|
|
412
|
+
if (method === 'OPTIONS') {
|
|
413
|
+
return resolve();
|
|
414
|
+
}
|
|
415
|
+
|
|
410
416
|
function _reject(e, log) {
|
|
411
417
|
if (log) {
|
|
412
418
|
// self.assistant.error(e, {environment: 'production'});
|