mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Revise url subscribe username and password API
This commit is contained in:
@@ -10,3 +10,5 @@ Critical protocol changes
|
|||||||
** "closeTime" DEPRECATED: use "close" or "close_human"
|
** "closeTime" DEPRECATED: use "close" or "close_human"
|
||||||
* stream "rt_accounts" --> "accounts_proposed"
|
* stream "rt_accounts" --> "accounts_proposed"
|
||||||
* stream "rt_transactions" --> "transactions_proposed"
|
* stream "rt_transactions" --> "transactions_proposed"
|
||||||
|
* subscribe "username" --> "url_username"
|
||||||
|
* subscribe "password" --> "url_password"
|
||||||
|
|||||||
@@ -2639,8 +2639,16 @@ Json::Value RPCHandler::doSubscribe(Json::Value jvRequest, int& cost)
|
|||||||
return rpcError(rpcNO_PERMISSION);
|
return rpcError(rpcNO_PERMISSION);
|
||||||
|
|
||||||
std::string strUrl = jvRequest["url"].asString();
|
std::string strUrl = jvRequest["url"].asString();
|
||||||
std::string strUsername = jvRequest.isMember("username") ? jvRequest["username"].asString() : "";
|
std::string strUsername = jvRequest.isMember("url_username") ? jvRequest["url_username"].asString() : "";
|
||||||
std::string strPassword = jvRequest.isMember("password") ? jvRequest["password"].asString() : "";
|
std::string strPassword = jvRequest.isMember("url_password") ? jvRequest["url_password"].asString() : "";
|
||||||
|
|
||||||
|
// DEPRICATED
|
||||||
|
if (jvRequest.isMember("username"))
|
||||||
|
strUsername = jvRequest["username"].asString();
|
||||||
|
|
||||||
|
// DEPRICATED
|
||||||
|
if (jvRequest.isMember("password"))
|
||||||
|
strPassword = jvRequest["password"].asString();
|
||||||
|
|
||||||
ispSub = mNetOps->findRpcSub(strUrl);
|
ispSub = mNetOps->findRpcSub(strUrl);
|
||||||
if (!ispSub)
|
if (!ispSub)
|
||||||
|
|||||||
Reference in New Issue
Block a user