From 2641293b6e7e8aeddb6863e403296a1d3fce124e Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Mon, 27 Oct 2014 23:14:51 -0700 Subject: [PATCH] API update --- src/lib/apis/master.js | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index 5062c4647..941c0cdea 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -3292,7 +3292,7 @@ api.indices.prototype.optimize = ca({ * @param {Object} params - An object with parameters used to carry out this action * @param {Date, Number} params.timeout - Explicit timestamp for the document * @param {Date, Number} params.masterTimeout - Specify timeout for connection to master - * @param {String, String[], Boolean} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the operation on all indices. + * @param {String, String[], Boolean} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. * @param {String} params.name - The name of the alias to be created or updated */ api.indices.prototype.putAlias = ca({ @@ -3305,27 +3305,17 @@ api.indices.prototype.putAlias = ca({ name: 'master_timeout' } }, - urls: [ - { - fmt: '/<%=index%>/_alias/<%=name%>', - req: { - index: { - type: 'list' - }, - name: { - type: 'string' - } - } - }, - { - fmt: '/_alias/<%=name%>', - req: { - name: { - type: 'string' - } + url: { + fmt: '/<%=index%>/_alias/<%=name%>', + req: { + index: { + type: 'list' + }, + name: { + type: 'string' } } - ], + }, method: 'PUT' });