diff --git a/dm-cli/Deals.cpp b/dm-cli/Deals.cpp index 19ccfca..c4c1b8b 100644 --- a/dm-cli/Deals.cpp +++ b/dm-cli/Deals.cpp @@ -625,9 +625,7 @@ int Deals::Negative() jsf = ReplaceAll(jsf, "leave_before", "leave-before"); data = "curl -s --location '"; data.append(address); - data.append("/api/v1/deal/feedback?server="); - data.append(url_encode(address)); - data.append("'"); + data.append("/api/v1/deal/feedback'"); data.append(" --header 'Content-Type: application/json' "); data.append("--data '"); data.append(jsf); diff --git a/dm-cli/Replace.cpp b/dm-cli/Replace.cpp index 35c7276..047d9b7 100644 --- a/dm-cli/Replace.cpp +++ b/dm-cli/Replace.cpp @@ -3,17 +3,21 @@ #include #include -std::string Replace(std::string source, std::string from, std::string out) { +std::string Replace(std::string source, std::string from, std::string out) +{ std::string res(""); size_t start = 0, stop = 0; start = source.find(from); stop = from.length(); - if (start >= 0) res = source.replace(start, stop, out); + if (start >= 0) + res = source.replace(start, stop, out); return res; } -std::string ReplaceAll(std::string str, const std::string& from, const std::string& to) { +std::string ReplaceAll(std::string str, const std::string &from, const std::string &to) +{ size_t start_pos = 0; - while ((start_pos = str.find(from, start_pos)) != std::string::npos) { + while ((start_pos = str.find(from, start_pos)) != std::string::npos) + { str.replace(start_pos, from.length(), to); start_pos += to.length(); // Handles case where 'to' is a substring of 'from' } @@ -22,6 +26,6 @@ std::string ReplaceAll(std::string str, const std::string& from, const std::stri int NoResponse(std::string mgs) { - std::cout << "No response from the server." + mgs << std::endl; + std::cout << "No response from the server. " + mgs << std::endl; return 1; } diff --git a/dm-cli/dm-cli b/dm-cli/dm-cli new file mode 100644 index 0000000..52fa8e7 Binary files /dev/null and b/dm-cli/dm-cli differ diff --git a/vc/dm-cli.vcxproj b/vc/dm-cli.vcxproj index 08c52c1..d699b67 100644 --- a/vc/dm-cli.vcxproj +++ b/vc/dm-cli.vcxproj @@ -52,39 +52,6 @@ - - - true - - - true - - - true - - - true - - - - - - - - - - - - - true - - - true - - - - - 17.0 Win32Proj diff --git a/vc/dm-cli.vcxproj.filters b/vc/dm-cli.vcxproj.filters index 7242721..858192d 100644 --- a/vc/dm-cli.vcxproj.filters +++ b/vc/dm-cli.vcxproj.filters @@ -92,59 +92,4 @@ - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - \ No newline at end of file