|
@@ -347,11 +347,11 @@ JsonCommander::Response JsonCommander::checkLogin(const Json::Value &message) {
|
|
response.json["error"] = "";
|
|
response.json["error"] = "";
|
|
} else if (!message["login"].asBool()) {
|
|
} else if (!message["login"].asBool()) {
|
|
// add user. Check if already exists before
|
|
// add user. Check if already exists before
|
|
- if(!UserManager::addUser(message["user"].asString(),
|
|
|
|
- message["pass"].asString())) {
|
|
|
|
- response.action = closeAndSend;
|
|
|
|
- response.json["accept"] = false;
|
|
|
|
- response.json["error"] = "user does already exist";
|
|
|
|
|
|
+ if (!UserManager::addUser(message["user"].asString(),
|
|
|
|
+ message["pass"].asString())) {
|
|
|
|
+ response.action = closeAndSend;
|
|
|
|
+ response.json["accept"] = false;
|
|
|
|
+ response.json["error"] = "user does already exist";
|
|
} else {
|
|
} else {
|
|
response.action = send;
|
|
response.action = send;
|
|
response.json["accept"] = true;
|
|
response.json["accept"] = true;
|