Skip to content

Commit

Permalink
Fixing GET route
Browse files Browse the repository at this point in the history
  • Loading branch information
f-galland committed Jan 30, 2025
1 parent 45d0c55 commit 55f1035
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package com.wazuh.contentmanager;

import com.wazuh.contentmanager.rest.GetHandler;
import org.opensearch.client.Client;
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
import org.opensearch.cluster.node.DiscoveryNode;
Expand All @@ -40,6 +41,7 @@
import org.opensearch.watcher.ResourceWatcherService;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.function.Supplier;

Expand Down Expand Up @@ -84,14 +86,7 @@ public List<RestHandler> getRestHandlers(
SettingsFilter settingsFilter,
IndexNameExpressionResolver indexNameExpressionResolver,
Supplier<DiscoveryNodes> nodesInCluster) {
return ActionPlugin.super.getRestHandlers(
settings,
restController,
clusterSettings,
indexScopedSettings,
settingsFilter,
indexNameExpressionResolver,
nodesInCluster);
return Collections.singletonList(new GetHandler());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class GetHandler extends BaseRestHandler {
@Override
public List<Route> routes() {
return List.of(
new Route(GET, String.format(Locale.ROOT, "%s", "_plugins/_content_manager/init")));
new Route(GET, String.format(Locale.ROOT, "%s", "/_plugins/_content_manager/init")));
}

@Override
Expand Down

0 comments on commit 55f1035

Please sign in to comment.