Skip to content

Commit

Permalink
🔥 remove X-Watson-Learning-Opt-Out from synthesize() and remove corre…
Browse files Browse the repository at this point in the history
…sponding test
  • Loading branch information
Ammar Dodin committed Nov 29, 2017
1 parent 0558f4e commit 9e79999
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions test/unit/test.text_to_speech.v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ describe('text_to_speech', function() {
assert.equal(req.headers['content-type'], 'application/json');
});

it('should support the X-Watson-Learning-Opt-Out option', function() {
const params = { 'X-Watson-Learning-Opt-Out': true, text: 'test' };
const req = text_to_speech.synthesize(params, noop);
assert.equal(req.headers['X-Watson-Learning-Opt-Out'], '1');
});

it('should support the customization_id option', function() {
const params = { customization_id: 'foo', text: 'test' };
const req = text_to_speech.synthesize(params, noop);
Expand Down
3 changes: 1 addition & 2 deletions text-to-speech/v1-generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,7 @@ class GeneratedTextToSpeechV1 extends BaseService {
defaultOptions: extend(true, {}, this._options, {
headers: {
accept: _params.accept || 'audio/basic',
'content-type': 'application/json',
'X-Watson-Learning-Opt-Out': _params['X-Watson-Learning-Opt-Out'] || 0
'content-type': 'application/json'
}
})
};
Expand Down

0 comments on commit 9e79999

Please sign in to comment.