From ba1b3c26c579ae9536f3c52d5022984a35522a30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Sun, 17 Jul 2022 12:21:08 -0400
Subject: [PATCH] procy client: use new routes

---
 src/dht_proxy_client.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/dht_proxy_client.cpp b/src/dht_proxy_client.cpp
index 1385076a..6930da8c 100644
--- a/src/dht_proxy_client.cpp
+++ b/src/dht_proxy_client.cpp
@@ -315,7 +315,7 @@ DhtProxyClient::get(const InfoHash& key, GetCallback cb, DoneCallback donecb, Va
         return;
     }
     try {
-        auto request = buildRequest("/" + key.toString());
+        auto request = buildRequest("/key/" + key.toString());
         auto reqid = request->id();
         //request->set_connection_type(restinio::http_connection_header_t::keep_alive);
         request->set_method(restinio::http_method_get());
@@ -485,7 +485,7 @@ DhtProxyClient::doPut(const InfoHash& key, Sp<Value> val, DoneCallbackSimple cb,
         logger_->d("[proxy:client] [put] [search %s] executing for %s", key.to_c_str(), val->toString().c_str());
 
     try {
-        auto request = buildRequest("/" + key.toString());
+        auto request = buildRequest("/key/" + key.toString());
         auto reqid = request->id();
         request->set_method(restinio::http_method_post());
         setHeaderFields(*request);
@@ -842,7 +842,7 @@ DhtProxyClient::listen(const InfoHash& key, ValueCallback cb, Value::Filter filt
         else {
             method = ListenMethod::SUBSCRIBE;
             header.method(restinio::http_method_subscribe());
-            header.request_target("/" + key.toString());
+            header.request_target("/key/" + key.toString());
         }
         sendListen(header, l->second.cb, opstate, l->second, method);
         return token;
@@ -928,7 +928,7 @@ DhtProxyClient::handleExpireListener(const asio::error_code &ec, const InfoHash&
 
         if (not deviceKey_.empty()) {
             // UNSUBSCRIBE
-            auto request = buildRequest("/" + key.toString());
+            auto request = buildRequest("/key/" + key.toString());
             auto reqid = request->id();
             try {
                 request->set_method(restinio::http_method_unsubscribe());
-- 
GitLab