File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ module.exports = function (RED) {
3838 sPassword = service . password ;
3939 }
4040
41- //toneutils.ping();
4241
4342 // Node RED Admin - fetch and set vcap services
4443 RED . httpAdmin . get ( '/watson-tone-analyzer/vcap' , function ( req , res ) {
@@ -85,14 +84,6 @@ module.exports = function (RED) {
8584 }
8685 } ;
8786
88- // Function to parse and determine tone setting
89- // 'all' is the setting which needs be be blanked
90- // if not the service will throw an error
91- var parseToneOption = function ( msg , config ) {
92- var tones = msg . tones || config . tones ;
93-
94- return ( tones === 'all' ? '' : tones ) ;
95- }
9687
9788 // function to parse through the options in preparation
9889 // for the sevice call.
@@ -103,7 +94,7 @@ module.exports = function (RED) {
10394 'isHTML' : msg . contentType || config . contentType
10495 } ;
10596
106- options . tones = parseToneOption ( msg , config ) ;
97+ options . tones = toneutils . parseToneOption ( msg , config ) ;
10798 return options ;
10899 }
109100
Original file line number Diff line number Diff line change @@ -42,6 +42,15 @@ ToneUtils.prototype = {
4242 }
4343
4444 return message ;
45+ } ,
46+
47+ // Function to parse and determine tone setting
48+ // 'all' is the setting which needs be be blanked
49+ // if not the service will throw an error
50+ parseToneOption : function ( msg , config ) {
51+ var tones = msg . tones || config . tones ;
52+
53+ return ( tones === 'all' ? '' : tones ) ;
4554 }
4655
4756
You can’t perform that action at this time.
0 commit comments