mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Update and fix JSON writer (#183)
* Fixing the check of createKey in handleConfigSetCommand * Update schema-config.json * add overwrite option to configset command * add overwrite option to setConfig function * add overwrite option to setConfig function
This commit is contained in:
committed by
redPanther
parent
e46d392ed1
commit
b9ad2977de
@@ -268,7 +268,7 @@ QString JsonConnection::getConfig(std::string type)
|
||||
return QString();
|
||||
}
|
||||
|
||||
void JsonConnection::setConfig(const std::string &jsonString, bool create)
|
||||
void JsonConnection::setConfig(const std::string &jsonString, bool create, bool overwrite)
|
||||
{
|
||||
// create command
|
||||
Json::Value command;
|
||||
@@ -276,6 +276,7 @@ void JsonConnection::setConfig(const std::string &jsonString, bool create)
|
||||
command["subcommand"] = "setconfig";
|
||||
|
||||
command["create"] = create;
|
||||
command["overwrite"] = overwrite;
|
||||
Json::Value & config = command["config"];
|
||||
if (jsonString.size() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user