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
|
namespace Online
|
||||||
{
|
{
|
||||||
const std::string API::VERSION = "v2";
|
|
||||||
const std::string API::USER_PATH = "user/";
|
const std::string API::USER_PATH = "user/";
|
||||||
const std::string API::SERVER_PATH = "server/";
|
const std::string API::SERVER_PATH = "server/";
|
||||||
|
|
||||||
@ -112,14 +111,19 @@ namespace Online
|
|||||||
{
|
{
|
||||||
setURL( (std::string)UserConfigParams::m_server_multiplayer +
|
setURL( (std::string)UserConfigParams::m_server_multiplayer +
|
||||||
"client-user.php" );
|
"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
|
else
|
||||||
{
|
{
|
||||||
setURL(
|
setURL(
|
||||||
(std::string)UserConfigParams::m_server_multiplayer +
|
(std::string)UserConfigParams::m_server_multiplayer +
|
||||||
API::VERSION + "/" + // eg: v1, v2, etc
|
+"v"+StringUtils::toString(UserConfigParams::m_server_version)
|
||||||
path + // eg: user/, server/
|
+ "/" + path + // eg: /user/, /server/
|
||||||
action + "/" // eg: connect/, pool/, get-server-list/
|
action + "/" // eg: connect/, pool/, get-server-list/
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ namespace Online
|
|||||||
class API
|
class API
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static const std::string VERSION;
|
|
||||||
static const std::string USER_PATH;
|
static const std::string USER_PATH;
|
||||||
static const std::string SERVER_PATH;
|
static const std::string SERVER_PATH;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user