For old server change actions change-password to change_password
and 'recover' to 'recovery'. Removed unused API::VERSION.
This commit is contained in:
parent
3f5ab358df
commit
40224a85f6
@ -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/
|
||||
);
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user