[CCR] Resume follow Api should not require a request body (#37217)
Closes #37022
This commit is contained in:
parent
eb12de550a
commit
1a41d84536
|
@ -52,7 +52,6 @@
|
|||
- do:
|
||||
ccr.resume_follow:
|
||||
index: bar
|
||||
body: {}
|
||||
- is_true: acknowledged
|
||||
|
||||
- do:
|
||||
|
|
|
@ -37,8 +37,14 @@ public class RestResumeFollowAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
static Request createRequest(RestRequest restRequest) throws IOException {
|
||||
if (restRequest.hasContentOrSourceParam()) {
|
||||
try (XContentParser parser = restRequest.contentOrSourceParamParser()) {
|
||||
return Request.fromXContent(parser, restRequest.param("index"));
|
||||
}
|
||||
} else {
|
||||
Request request = new Request();
|
||||
request.setFollowerIndex(restRequest.param("index"));
|
||||
return request;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"body": {
|
||||
"description" : "The name of the leader index and other optional ccr related parameters",
|
||||
"required" : true
|
||||
"required" : false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue