API generation

This commit is contained in:
delvedor
2018-11-05 19:17:55 +01:00
parent 49cff40e96
commit 2d3701d7e9
122 changed files with 458 additions and 457 deletions

View File

@ -2,7 +2,7 @@
function buildClusterHealth (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html) request
*
@ -36,7 +36,7 @@ function buildClusterHealth (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -100,7 +100,7 @@ function buildClusterHealth (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}