diff --git a/src/online/http_request.cpp b/src/online/http_request.cpp index 8ea638d95..6a97a5182 100644 --- a/src/online/http_request.cpp +++ b/src/online/http_request.cpp @@ -30,7 +30,6 @@ namespace Online { - const std::string API::VERSION = "v2"; const std::string API::USER_PATH = "user/"; const std::string API::SERVER_PATH = "server/"; @@ -112,14 +111,19 @@ namespace Online { setURL( (std::string)UserConfigParams::m_server_multiplayer + "client-user.php" ); - addParameter("action", action); + if(action=="change-password") + addParameter("action", "change_password"); + else if(action=="recover") + addParameter("action", "recovery"); + else + addParameter("action", action); } else { setURL( (std::string)UserConfigParams::m_server_multiplayer + - API::VERSION + "/" + // eg: v1, v2, etc - path + // eg: user/, server/ + +"v"+StringUtils::toString(UserConfigParams::m_server_version) + + "/" + path + // eg: /user/, /server/ action + "/" // eg: connect/, pool/, get-server-list/ ); } diff --git a/src/online/http_request.hpp b/src/online/http_request.hpp index 3e94bdff4..faba9f49d 100644 --- a/src/online/http_request.hpp +++ b/src/online/http_request.hpp @@ -37,7 +37,6 @@ namespace Online class API { public: - static const std::string VERSION; static const std::string USER_PATH; static const std::string SERVER_PATH; };