committed by
GitHub
parent
36163f4822
commit
ed3cca0fe6
@ -62,7 +62,7 @@ function buildMlDeleteCalendarEvent (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['event_id'] != null || params['eventId'] != null) && ((params['calendar_id'] == null || params['calendarId']))) {
|
||||
if ((params['event_id'] != null || params['eventId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: calendar_id'),
|
||||
result
|
||||
|
||||
@ -62,7 +62,7 @@ function buildMlDeleteCalendarJob (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null || params['calendarId']))) {
|
||||
if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: calendar_id'),
|
||||
result
|
||||
|
||||
@ -60,7 +60,7 @@ function buildMlDeleteForecast (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['forecast_id'] != null || params['forecastId'] != null) && ((params['job_id'] == null || params['jobId']))) {
|
||||
if ((params['forecast_id'] != null || params['forecastId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: job_id'),
|
||||
result
|
||||
|
||||
@ -62,7 +62,7 @@ function buildMlDeleteModelSnapshot (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null || params['jobId']))) {
|
||||
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: job_id'),
|
||||
result
|
||||
|
||||
@ -109,7 +109,7 @@ function buildMlFindFileStructure (opts) {
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
bulkBody: body,
|
||||
querystring
|
||||
}
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ function buildMlGetBuckets (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['timestamp'] != null && ((params['job_id'] == null || params['jobId']))) {
|
||||
if (params['timestamp'] != null && ((params['job_id'] == null && params['jobId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: job_id'),
|
||||
result
|
||||
|
||||
@ -62,7 +62,7 @@ function buildMlGetModelSnapshots (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null || params['jobId']))) {
|
||||
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: job_id'),
|
||||
result
|
||||
|
||||
@ -62,7 +62,7 @@ function buildMlPutCalendarJob (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null || params['calendarId']))) {
|
||||
if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: calendar_id'),
|
||||
result
|
||||
|
||||
@ -58,7 +58,7 @@ function buildMlRevertModelSnapshot (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null || params['jobId']))) {
|
||||
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: job_id'),
|
||||
result
|
||||
|
||||
@ -63,7 +63,7 @@ function buildMlUpdateModelSnapshot (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null || params['jobId']))) {
|
||||
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: job_id'),
|
||||
result
|
||||
|
||||
@ -80,7 +80,13 @@ function buildSecurityGetPrivileges (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
||||
if (application && name) {
|
||||
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
||||
} else if (application) {
|
||||
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application)
|
||||
} else {
|
||||
path = '/' + '_security' + '/' + 'privilege'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -56,7 +56,7 @@ function buildXpackWatcherAckWatch (opts) {
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['action_id'] != null || params['actionId'] != null) && ((params['watch_id'] == null || params['watchId']))) {
|
||||
if ((params['action_id'] != null || params['actionId'] != null) && ((params['watch_id'] == null && params['watchId'] == null))) {
|
||||
return callback(
|
||||
new ConfigurationError('Missing required parameter of the url: watch_id'),
|
||||
result
|
||||
|
||||
Reference in New Issue
Block a user