jmacura преди 5 години
родител
ревизия
387dc99425
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      index.js

+ 4 - 2
index.js

@@ -132,8 +132,10 @@ app.get('/runR', (req, res, next) => {
         function(err, data) {
             console.log('R done');
             if (err) console.log(err.toString('utf8'))
-            else console.log(data);
-            if (!data) data = {result: 'R call succesful'}
+            else {
+							console.log(data);
+              data = {result: 'R call succesful'};
+						}
             helpers.formatResponse({ response: data }, req, res);
         }
     );