From 47f5b82b4e95eb5bb129eda12e8f4c16248a7d76 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 24 Jan 2025 13:30:25 -0600 Subject: [PATCH] refactor --- .../librepertory/src/rpc/client/client.cpp | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/repertory/librepertory/src/rpc/client/client.cpp b/repertory/librepertory/src/rpc/client/client.cpp index 90c774a2..0210f24b 100644 --- a/repertory/librepertory/src/rpc/client/client.cpp +++ b/repertory/librepertory/src/rpc/client/client.cpp @@ -29,7 +29,7 @@ namespace repertory { client::client(rpc_host_info host_info) : host_info_(std::move(host_info)) {} auto client::get_drive_information() -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Client cli{base_url}; @@ -56,7 +56,7 @@ auto client::get_drive_information() -> rpc_response { } auto client::get_config() -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Client cli{base_url}; @@ -83,7 +83,7 @@ auto client::get_config() -> rpc_response { } auto client::get_config_value_by_name(const std::string &name) -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Params params{{"name", name}}; @@ -112,7 +112,7 @@ auto client::get_config_value_by_name(const std::string &name) -> rpc_response { } auto client::get_directory_items(const std::string &api_path) -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Params params{{"api_path", api_path}}; @@ -140,7 +140,7 @@ auto client::get_directory_items(const std::string &api_path) -> rpc_response { } auto client::get_open_files() -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Client cli{base_url}; @@ -167,7 +167,7 @@ auto client::get_open_files() -> rpc_response { } auto client::get_pinned_files() -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Client cli{base_url}; @@ -194,7 +194,7 @@ auto client::get_pinned_files() -> rpc_response { } auto client::pin_file(const std::string &api_path) -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Params params{{"api_path", api_path}}; @@ -222,7 +222,7 @@ auto client::pin_file(const std::string &api_path) -> rpc_response { } auto client::pinned_status(const std::string &api_path) -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Params params{{"api_path", api_path}}; @@ -252,7 +252,7 @@ auto client::pinned_status(const std::string &api_path) -> rpc_response { auto client::set_config_value_by_name(const std::string &name, const std::string &value) -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Params params{ @@ -285,7 +285,7 @@ auto client::set_config_value_by_name(const std::string &name, } auto client::unmount() -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Client cli{base_url}; @@ -312,7 +312,7 @@ auto client::unmount() -> rpc_response { } auto client::unpin_file(const std::string &api_path) -> rpc_response { - const auto base_url = + auto base_url = "http://" + host_info_.host + ":" + std::to_string(host_info_.port); httplib::Params params{{"api_path", api_path}};