From 18fb22e2e158c8f1d42757a37584ec71a4dd94e9 Mon Sep 17 00:00:00 2001
From: blavenie <benoit.lavenier@e-is.pro>
Date: Tue, 8 Jan 2019 14:51:28 +0100
Subject: [PATCH] [fix] Pushing peering docu to endpoint with the api :
 ES_CORE_API (BMA/BMAS no more support POST to /network/peering)

---
 .../src/main/assembly/config/elasticsearch.yml                | 4 ++--
 .../main/java/org/duniter/elasticsearch/PluginSettings.java   | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/cesium-plus-pod-assembly/src/main/assembly/config/elasticsearch.yml b/cesium-plus-pod-assembly/src/main/assembly/config/elasticsearch.yml
index bdaa2074..d7153cb9 100644
--- a/cesium-plus-pod-assembly/src/main/assembly/config/elasticsearch.yml
+++ b/cesium-plus-pod-assembly/src/main/assembly/config/elasticsearch.yml
@@ -207,11 +207,11 @@ duniter.p2p.includes.endpoints: [
 #
 # duniter.p2p.peering.enable: false
 #
-# Define targeted API (for peers slection) where to send the peer document (if peering is enable). (Default: ["BASIC_MERKLED_API", "BMAS"])
+# Define targeted API (for peers slection) where to send the peer document (if peering is enable). (Default: ["ES_CORE_API"])
 # This API should accept a POST request to '/network/peering' (will send a see the Duniter protocol)
 #
 # duniter.p2p.peering.targetedApis: [
-#  "BASIC_MERKLED_API", "BMAS"
+#  "ES_CORE_API"
 # ]
 #
 # Define cluster API to publish (if peering is enable). By default, all compatible API
diff --git a/cesium-plus-pod-core/src/main/java/org/duniter/elasticsearch/PluginSettings.java b/cesium-plus-pod-core/src/main/java/org/duniter/elasticsearch/PluginSettings.java
index c2a17557..c03d2d20 100644
--- a/cesium-plus-pod-core/src/main/java/org/duniter/elasticsearch/PluginSettings.java
+++ b/cesium-plus-pod-core/src/main/java/org/duniter/elasticsearch/PluginSettings.java
@@ -322,8 +322,7 @@ public class PluginSettings extends AbstractLifecycleComponent<PluginSettings> {
      */
     public Collection<EndpointApi> getPeeringTargetedApis() {
         String[] targetedApis = settings.getAsArray("duniter.p2p.peering.targetedApis", new String[]{
-                EndpointApi.BASIC_MERKLED_API.name(),
-                EndpointApi.BMAS.name()
+                EndpointApi.ES_CORE_API.name()
         });
         if (CollectionUtils.isEmpty(targetedApis)) return null;
 
-- 
GitLab