Skip to content

Commit

Permalink
Refactored GetRemoteIndexes indexes path param to a query param.
Browse files Browse the repository at this point in the history
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt committed Oct 17, 2023
1 parent a26bc5d commit 23bb24e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import org.opensearch.rest.action.RestToXContentListener
private val log = LogManager.getLogger(RestGetRemoteIndexesAction::class.java)

class RestGetRemoteIndexesAction : BaseRestHandler() {
val ROUTE = "${AlertingPlugin.REMOTE_BASE_URI}/indexes/{${GetRemoteIndexesRequest.INDEXES_FIELD}}"
val ROUTE = "${AlertingPlugin.REMOTE_BASE_URI}/indexes"

override fun getName(): String {
return "get_remote_indexes_action"
Expand All @@ -37,7 +37,7 @@ class RestGetRemoteIndexesAction : BaseRestHandler() {
log.info("hurneyt RestGetRemoteIndexesAction::request.uri = {}", request.uri())

val indexes = Strings.splitStringByCommaToArray(request.param(GetRemoteIndexesRequest.INDEXES_FIELD, ""))
log.info("hurneyt RestGetRemoteIndexesAction::indexes = ", indexes)
log.info("hurneyt RestGetRemoteIndexesAction::indexes = {}", indexes)

val includeMappings = request.paramAsBoolean(GetRemoteIndexesRequest.INCLUDE_MAPPINGS_FIELD, false)
log.info("hurneyt RestGetRemoteIndexesAction::includeMappings = {}", includeMappings)
Expand Down

0 comments on commit 23bb24e

Please sign in to comment.