API generation
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
function buildIndicesDeleteTemplate (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError } = opts
|
||||
const { makeRequest, ConfigurationError, result } = opts
|
||||
/**
|
||||
* Perform a [indices.delete_template](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
|
||||
*
|
||||
@ -28,13 +28,13 @@ function buildIndicesDeleteTemplate (opts) {
|
||||
if (params['name'] == null) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter: name'),
|
||||
{ body: null, headers: null, statusCode: null }
|
||||
result
|
||||
)
|
||||
}
|
||||
if (params.body != null) {
|
||||
return callback(
|
||||
new ConfigurationError('This API does not require a body'),
|
||||
{ body: null, headers: null, statusCode: null }
|
||||
result
|
||||
)
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ function buildIndicesDeleteTemplate (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
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user