diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-11-23 16:23:44 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-11-23 16:23:44 -0800 |
| commit | 4a7ee5472d8c2fbeb9b7242ed1c0d71302407b6e (patch) | |
| tree | 38dca41925f0ec7f3b3ee436d93316afe5f45099 | |
| parent | 8718b33a668f1070e3c4312b91d4aa5ce0603eaf (diff) | |
| download | infinitytier-4a7ee5472d8c2fbeb9b7242ed1c0d71302407b6e.tar.gz infinitytier-4a7ee5472d8c2fbeb9b7242ed1c0d71302407b6e.zip | |
Small fixes.
| -rw-r--r-- | service/ControlPlane.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp index 21afee52..3addb5df 100644 --- a/service/ControlPlane.cpp +++ b/service/ControlPlane.cpp @@ -415,7 +415,7 @@ unsigned int ControlPlane::handleRequest( ((clusterJson.length() > 0) ? clusterJson.c_str() : "null")); responseBody = json; scode = 200; - } else if (ps[0] == "config") { + } else if (ps[0] == "settings") { responseContentType = "application/json"; responseBody = "{}"; // TODO scode = 200; @@ -501,7 +501,7 @@ unsigned int ControlPlane::handleRequest( if (isAuth) { - if (ps[0] == "config") { + if (ps[0] == "settings") { // TODO } else if (ps[0] == "network") { if (ps.size() == 2) { @@ -517,11 +517,11 @@ unsigned int ControlPlane::handleRequest( try { nlohmann::json j(nlohmann::json::parse(body)); if (j.is_object()) { - auto allowManaged = j["allowManaged"]; + nlohmann::json &allowManaged = j["allowManaged"]; if (allowManaged.is_boolean()) localSettings.allowManaged = (bool)allowManaged; - auto allowGlobal = j["allowGlobal"]; + nlohmann::json &allowGlobal = j["allowGlobal"]; if (allowGlobal.is_boolean()) localSettings.allowGlobal = (bool)allowGlobal; - auto allowDefault = j["allowDefault"]; + nlohmann::json &allowDefault = j["allowDefault"]; if (allowDefault.is_boolean()) localSettings.allowDefault = (bool)allowDefault; } } catch ( ... ) { |
