Close #20
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -3,17 +3,21 @@
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
BIN
dm-cli/dm-cli
Normal file
BIN
dm-cli/dm-cli
Normal file
Binary file not shown.
@@ -52,39 +52,6 @@
|
||||
</None>
|
||||
<None Include="..\dm-cli\test.cmd" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\dm-cli\account_status_en.txt">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\account_status_ru.txt">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\account_update_en.txt">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\account_update_ru.txt">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deals_en.txt" />
|
||||
<Text Include="..\dm-cli\deals_ru.txt" />
|
||||
<Text Include="..\dm-cli\deal_cancel_en.txt" />
|
||||
<Text Include="..\dm-cli\deal_cancel_ru.txt" />
|
||||
<Text Include="..\dm-cli\deal_complete_en.txt" />
|
||||
<Text Include="..\dm-cli\deal_complete_ru.txt" />
|
||||
<Text Include="..\dm-cli\deal_negative_en.txt" />
|
||||
<Text Include="..\dm-cli\deal_negative_ru.txt" />
|
||||
<Text Include="..\dm-cli\deal_status_en.txt" />
|
||||
<Text Include="..\dm-cli\deal_status_ru.txt" />
|
||||
<Text Include="..\dm-cli\main_help_en.txt">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\main_help_ru.txt">
|
||||
<DeploymentContent>true</DeploymentContent>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\tpl\accountupdatebtm.txt" />
|
||||
<Text Include="..\dm-cli\tpl\accountupdateurl.txt" />
|
||||
<Text Include="..\dm-cli\tpl\deal_create.txt" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
|
||||
@@ -92,59 +92,4 @@
|
||||
<None Include="..\dm-cli\createdistr.sh" />
|
||||
<None Include="..\dm-cli\check.sh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\dm-cli\main_help_ru.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\main_help_en.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\account_update_ru.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\account_update_en.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\account_status_ru.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\account_status_en.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\tpl\accountupdateurl.txt" />
|
||||
<Text Include="..\dm-cli\tpl\accountupdatebtm.txt" />
|
||||
<Text Include="..\dm-cli\deals_ru.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deals_en.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deal_status_ru.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deal_status_en.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deal_complete_ru.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deal_complete_en.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deal_cancel_ru.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deal_cancel_en.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deal_negative_ru.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\deal_negative_en.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
<Text Include="..\dm-cli\tpl\deal_create.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user