Update samples for javascript + javascript-promise. (#5241)

This commit is contained in:
Paŭlo Ebermann 2017-03-30 17:04:49 +02:00 committed by wing328
parent 4e1d9ea010
commit 36d1406493
4 changed files with 6 additions and 6 deletions

View File

@ -414,7 +414,7 @@
if (accept) { if (accept) {
request.accept(accept); request.accept(accept);
} }
if (returnType === 'Blob') { if (returnType === 'Blob') {
request.responseType('blob'); request.responseType('blob');
} }

View File

@ -97,10 +97,10 @@
obj['string'] = ApiClient.convertToType(data['string'], 'String'); obj['string'] = ApiClient.convertToType(data['string'], 'String');
} }
if (data.hasOwnProperty('byte')) { if (data.hasOwnProperty('byte')) {
obj['byte'] = ApiClient.convertToType(data['byte'], Blob); obj['byte'] = ApiClient.convertToType(data['byte'], 'Blob');
} }
if (data.hasOwnProperty('binary')) { if (data.hasOwnProperty('binary')) {
obj['binary'] = ApiClient.convertToType(data['binary'], Blob); obj['binary'] = ApiClient.convertToType(data['binary'], 'Blob');
} }
if (data.hasOwnProperty('date')) { if (data.hasOwnProperty('date')) {
obj['date'] = ApiClient.convertToType(data['date'], 'Date'); obj['date'] = ApiClient.convertToType(data['date'], 'Date');

View File

@ -423,7 +423,7 @@
if (accept) { if (accept) {
request.accept(accept); request.accept(accept);
} }
if (returnType === 'Blob') { if (returnType === 'Blob') {
request.responseType('blob'); request.responseType('blob');
} }

View File

@ -97,10 +97,10 @@
obj['string'] = ApiClient.convertToType(data['string'], 'String'); obj['string'] = ApiClient.convertToType(data['string'], 'String');
} }
if (data.hasOwnProperty('byte')) { if (data.hasOwnProperty('byte')) {
obj['byte'] = ApiClient.convertToType(data['byte'], Blob); obj['byte'] = ApiClient.convertToType(data['byte'], 'Blob');
} }
if (data.hasOwnProperty('binary')) { if (data.hasOwnProperty('binary')) {
obj['binary'] = ApiClient.convertToType(data['binary'], Blob); obj['binary'] = ApiClient.convertToType(data['binary'], 'Blob');
} }
if (data.hasOwnProperty('date')) { if (data.hasOwnProperty('date')) {
obj['date'] = ApiClient.convertToType(data['date'], 'Date'); obj['date'] = ApiClient.convertToType(data['date'], 'Date');