Skip to content

Commit 18744ee

Browse files
committed
Language fix for Discovery Create Collection
1 parent 14dee69 commit 18744ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

discovery/v1.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ DiscoveryV1.prototype.createCollection = function(params, callback) {
344344
params = params || {};
345345

346346
params.language_code = params.language_code || 'en_us';
347+
params.language = params.language || params.language_code;
347348

348349
const parameters = {
349350
options: {
@@ -353,7 +354,7 @@ DiscoveryV1.prototype.createCollection = function(params, callback) {
353354
multipart: [
354355
{
355356
'content-type': 'application/json',
356-
body: JSON.stringify(pick(params, ['name', 'description', 'configuration_id', 'language_code']))
357+
body: JSON.stringify(pick(params, ['name', 'description', 'configuration_id', 'language']))
357358
}
358359
],
359360
json: true

0 commit comments

Comments
 (0)