Compare View

switch
from
...
to
 
Commits (2)

Changes

Showing 5 changed files Side-by-side Diff

... ... @@ -13,6 +13,5 @@
13 13 "ascending_mutation": false,
14 14 "blacklist_help_for_origins": [],
15 15 "blacklist_help_for_origin_transports": [],
16   - "do_not_forward_rc68_to_centers": [],
17 16 "disable_claim_bonus": false
18 17 }
19 18 \ No newline at end of file
lib/coreapi/request.js
... ... @@ -4,7 +4,6 @@ const request = require('request');
4 4 const uniqid = require('uniqid');
5 5  
6 6 const coreUrl = require('komodo-sdk/core-url');
7   -const config = require('komodo-sdk/config');
8 7 const logger = require('komodo-sdk/logger');
9 8 const commandError = require('../command-handler/error');
10 9  
... ... @@ -66,19 +65,20 @@ function execute(coreEndpoint, params, httpMethod, cb) {
66 65 xid, coreResponseObject,
67 66 });
68 67  
69   - // jangan kirim reply rc 68 jika origin/center ada di do_not_forward_rc68_to_centers
70   - if (
71   - coreResponseObject && coreResponseObject.rc === '68'
72   - && config && config.do_not_forward_rc68_to_centers
73   - && params && params.origin && params.origin.trim()
74   - && typeof params.origin === 'string'
75   - && Array.isArray(config.do_not_forward_rc68_to_centers)
76   - && config.do_not_forward_rc68_to_centers
77   - .map((item) => item && (typeof item === 'string') && item.trim().toUpperCase())
78   - .indexOf(params.origin.trim().toUpperCase()) >= 0
79   - ) {
80   - return;
81   - }
  68 + // jangan kirim reply rc 68 jika origin/center ada di do_not_forward_rc68_to_centers.
  69 + // tidak jadi, ditangani di center masing2 via komodo-center-messaging-lib
  70 + // if (
  71 + // coreResponseObject && coreResponseObject.rc === '68'
  72 + // && config && config.do_not_forward_rc68_to_centers
  73 + // && params && params.origin && params.origin.trim()
  74 + // && typeof params.origin === 'string'
  75 + // && Array.isArray(config.do_not_forward_rc68_to_centers)
  76 + // && config.do_not_forward_rc68_to_centers
  77 + // .map((item) => item && (typeof item === 'string') && item.trim().toUpperCase())
  78 + // .indexOf(params.origin.trim().toUpperCase()) >= 0
  79 + // ) {
  80 + // return;
  81 + // }
82 82  
83 83 cb(err, coreResponseObject, responseParams);
84 84 })
lib/http-listener.js
... ... @@ -105,11 +105,9 @@ function mainHandler(req, res) {
105 105 commandHandler(req.body.msg || req.query.msg, params, function(err, coreResponseObject, responseParams) {
106 106 if (err) {
107 107 res.end('ERROR. ' + err);
108   - }
109   - else if (coreResponseObject) {
  108 + } else if (coreResponseObject) {
110 109 res.json(coreResponseObject);
111   - }
112   - else {
  110 + } else {
113 111 res.end(responseParams.body);
114 112 }
115 113 })
1 1 {
2 2 "name": "komodo-center-messaging",
3   - "version": "0.14.2",
  3 + "version": "0.14.3",
4 4 "lockfileVersion": 1,
5 5 "requires": true,
6 6 "dependencies": {
1 1 {
2 2 "name": "komodo-center-messaging",
3   - "version": "0.14.2",
  3 + "version": "0.14.3",
4 4 "description": "Komodo Common Messaging Center",
5 5 "main": "index.js",
6 6 "scripts": {