node-red-contrib-teamogy-api 0.0.5 → 0.0.6

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/teamogy-client.js CHANGED
@@ -93,10 +93,10 @@ module.exports = function(RED) {
93
93
  }
94
94
 
95
95
  } catch (e) {
96
- node.error(e.message);
96
+ this.error(e.message);
97
97
  }
98
98
  }
99
-
99
+
100
100
  RED.nodes.registerType('teamogy-config', ConnectionNode, {
101
101
  credentials: {
102
102
  token: {type: 'password'}
@@ -213,7 +213,7 @@ module.exports = function(RED) {
213
213
 
214
214
  if(entity.split('_')[0] == 'v') { url = url + 'views/'}
215
215
 
216
- url = url + entity.split('_')[1].replaceAll('-','.')
216
+ url = url + entity.substring(entity.indexOf('_') + 1).replaceAll('-','.')
217
217
 
218
218
  if(!isEmpty(mparams)) { url = url + '?' + mparams }
219
219