Add -h key to all deal tree
This commit is contained in:
@@ -65,15 +65,15 @@ Deals::Deals(const InputParser& parser, const bool isRussian, const string addre
|
|||||||
int Deals::Process()
|
int Deals::Process()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("create") && this->parser.cmdOptionExists("--help"))
|
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("create") && (this->parser.cmdOptionExists("--help") || parser.cmdOptionExists("-h")))
|
||||||
return this->HelpCreate();
|
return this->HelpCreate();
|
||||||
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("status") && this->parser.cmdOptionExists("--help"))
|
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("status") && (this->parser.cmdOptionExists("--help") || parser.cmdOptionExists("-h")))
|
||||||
return this->HelpDealStatus();
|
return this->HelpDealStatus();
|
||||||
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("complete") && this->parser.cmdOptionExists("--help"))
|
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("complete") && (this->parser.cmdOptionExists("--help") || parser.cmdOptionExists("-h")))
|
||||||
return this->HelpDealComplete();
|
return this->HelpDealComplete();
|
||||||
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("cancel") && this->parser.cmdOptionExists("--help"))
|
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("cancel") && (this->parser.cmdOptionExists("--help") || parser.cmdOptionExists("-h")))
|
||||||
return this->HelpDealCancel();
|
return this->HelpDealCancel();
|
||||||
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("negative") && this->parser.cmdOptionExists("--help"))
|
if (parser.cmdOptionExists("deal") && this->parser.cmdOptionExists("negative") && (this->parser.cmdOptionExists("--help") || parser.cmdOptionExists("-h")))
|
||||||
return this->HelpDealNegative();
|
return this->HelpDealNegative();
|
||||||
|
|
||||||
return Update();
|
return Update();
|
||||||
@@ -312,7 +312,7 @@ int Deals::Complite() {
|
|||||||
ShowDebug(data, decoded, 0, result);
|
ShowDebug(data, decoded, 0, result);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int Deals::Cancel() {
|
int Deals::Cancel() {
|
||||||
string data = CommonStatus();
|
string data = CommonStatus();
|
||||||
string result = ExecCommand(data.c_str());
|
string result = ExecCommand(data.c_str());
|
||||||
if (result.length() == 0)
|
if (result.length() == 0)
|
||||||
@@ -331,7 +331,7 @@ int Deals::Cancel() {
|
|||||||
sign = GetVal("-s", "--signature");
|
sign = GetVal("-s", "--signature");
|
||||||
}
|
}
|
||||||
|
|
||||||
deal["seller"]["signature"] = sign;
|
deal["seller"]["signature"] = sign;
|
||||||
deal["feedback"]["comments"] = message;
|
deal["feedback"]["comments"] = message;
|
||||||
|
|
||||||
string jsf = deal.dump();
|
string jsf = deal.dump();
|
||||||
@@ -346,7 +346,7 @@ int Deals::Cancel() {
|
|||||||
result = ExecCommand(data.c_str());
|
result = ExecCommand(data.c_str());
|
||||||
if (result.length() == 0)
|
if (result.length() == 0)
|
||||||
return NoResponse("");
|
return NoResponse("");
|
||||||
|
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
stream << "success: " << jsonData["result"]["success"] << endl;
|
stream << "success: " << jsonData["result"]["success"] << endl;
|
||||||
stream << "message: " << jsonData["result"]["message"] << endl;
|
stream << "message: " << jsonData["result"]["message"] << endl;
|
||||||
@@ -361,7 +361,7 @@ int Deals::Cancel() {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
int Deals::Negative() {
|
int Deals::Negative() {
|
||||||
string data = CommonStatus();
|
string data = CommonStatus();
|
||||||
string result = ExecCommand(data.c_str());
|
string result = ExecCommand(data.c_str());
|
||||||
if (result.length() == 0)
|
if (result.length() == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user