|
@@ -346,10 +346,10 @@ JsonCommander::Response JsonCommander::checkLogin(const Json::Value &message) {
|
|
|
response.json["accept"] = true;
|
|
|
response.json["error"] = "";
|
|
|
} else if (!message["login"].asBool()) {
|
|
|
- // TODO implement registration
|
|
|
+ UserManager::addUser(message["user"].asString(), message["pass"].asString());
|
|
|
response.action = closeAndSend;
|
|
|
- response.json["accept"] = false;
|
|
|
- response.json["error"] = "registration is not yet implemented";
|
|
|
+ response.json["accept"] = true;
|
|
|
+ response.json["error"] = "";
|
|
|
} else {
|
|
|
response.action = closeAndSend;
|
|
|
response.json["accept"] = false;
|