Compare View

switch
from
...
to
 
Commits (2)

Changes

Showing 2 changed files Side-by-side Diff

... ... @@ -70,20 +70,20 @@ function forwardCoreTaskToPartner(coreMessage) {
70 70 partner.buy(task);
71 71 }
72 72  
73   -function report(trx_id, rc, message, sn) {
  73 +//function report(trx_id, rc, message, sn) {
  74 +function report(data) {
74 75 let options = {
75 76 url: config.pull_url.report.replace('<CORE_APIKEY>', config.core_apikey),
76 77 qs: {
77   - trx_id: trx_id,
78   - rc: rc,
79   - message: message,
80   - handler: config.handler_name
  78 + trx_id: data.trx_id,
  79 + rc: data.rc,
  80 + message: data.message,
  81 + handler: config.handler_name,
  82 + sn: data.sn,
  83 + supplier_price: data.supplier_price
81 84 }
82 85 }
83 86  
84   - if (sn) {
85   - options.qs.sn = sn;
86   - }
87 87  
88 88 request(options, function(error, response, body) {
89 89 if (error) {
... ... @@ -98,13 +98,13 @@ function report(trx_id, rc, message, sn) {
98 98 });
99 99 }
100 100  
101   -function resendReport(trx_id, rc, message, sn) {
  101 +function resendReport(data) {
102 102 let sleepBeforeResend = 1000;
103 103 logger.verbose('Resend report to CORE in ' + sleepBeforeResend + 'ms')
104 104  
105 105 setTimeout(
106 106 function() {
107   - report(trx_id, rc, message, sn);
  107 + report(data);
108 108 },
109 109 sleepBeforeResend
110 110 )
1 1 {
2 2 "name": "komodo-sdk",
3   - "version": "1.6.0",
  3 + "version": "1.6.1",
4 4 "description": "SDK for Komodo",
5 5 "main": "index.js",
6 6 "scripts": {