SPARK-1119 (deleting unused API functions)
This commit is contained in:
1 parent
7546c5f2e2
commit
97e73a23b0
3 files changed
+2
-233
No files matched your search
@@ -65,86 +65,6 @@ void AdminServiceServer::update_account(const api::admin::AccountUpdateAPIArgume
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::set_account_clip_limits(const api::admin::AccountSecurityClipLimitsAPIArgument& arg,
|
||||
const api::Response<::bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
bts::api::admin::BTSAccount* account = AdminServiceUtils::find_account(_state, arg.account_id());
|
||||
if (account != nullptr)
|
||||
account->mutable_security_clip_limits()->CopyFrom(arg.complete_data());
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Account does not exist");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::set_account_product_position_limits(const api::admin::AccountProductPositionLimitsAPIArgument& arg,
|
||||
const api::Response<bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
bts::api::admin::BTSAccount* account = AdminServiceUtils::find_account(_state, arg.account_id());
|
||||
if (account != nullptr)
|
||||
account->mutable_product_position_limits()->CopyFrom(arg.complete_data());
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Account does not exist");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::set_account_security_position_limits(const api::admin::AccountSecurityPositionLimitsAPIArgument& arg,
|
||||
const api::Response<bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
bts::api::admin::BTSAccount* account = AdminServiceUtils::find_account(_state, arg.account_id());
|
||||
if (account != nullptr)
|
||||
account->mutable_security_position_limits()->CopyFrom(arg.complete_data());
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Account does not exist");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::set_account_margin_limits(const api::admin::AccountMarginLimitAPIArgument& arg,
|
||||
const api::Response<bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
bts::api::admin::BTSAccount* account = AdminServiceUtils::find_account(_state, arg.account_id());
|
||||
if(account != nullptr){
|
||||
account->mutable_margin_limit()->CopyFrom(arg.complete_data());
|
||||
}
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Could not find account");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::set_account_connections(const api::admin::AccountConnectionsAPIArgument& arg,
|
||||
const api::Response<bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
bts::api::admin::BTSAccount* account = AdminServiceUtils::find_account(_state, arg.account_id());
|
||||
if(account != nullptr){
|
||||
account->mutable_connections()->CopyFrom(arg.complete_data());
|
||||
}
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Could not find account");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::set_account_exchange_data(const api::admin::AccountExchangeDataAPIArgument& account_exchange_data,
|
||||
const api::Response<::bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
bts::api::admin::BTSAccount* account = AdminServiceUtils::find_account(_state, account_exchange_data.account_id());
|
||||
if(account != nullptr)
|
||||
account->mutable_exchange_account_data()->CopyFrom(account_exchange_data.complete_data());
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Could not find account");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::create_user(const api::admin::UserCreateAPIArgument& request,
|
||||
const api::Response<::bts::api::admin::AdminServiceCreateEntityResult>& reply){
|
||||
bts::api::admin::AdminServiceCreateEntityResult result;
|
||||
@@ -160,64 +80,6 @@ void AdminServiceServer::update_user(const api::admin::UserUpdateAPIArgument& re
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::change_user_password(const bts::api::admin::UserPasswordAPIArgument& arg,
|
||||
const api::Response<::bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
bts::api::admin::BTSUser* user = AdminServiceUtils::find_user(_state, arg.user_id());
|
||||
if (user != nullptr)
|
||||
user->set_password(arg.password());
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Could not find user");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::set_user_account_association(const api::admin::UserAccountAssociationAPIArgument& arg,
|
||||
const api::Response<::bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
bts::api::admin::BTSUser* user = AdminServiceUtils::find_user(_state, arg.user_id());
|
||||
if (user != nullptr){
|
||||
if (arg.has_complete_data())
|
||||
AdminServiceUtils::set_user_accounts(user, arg.complete_data());
|
||||
else
|
||||
AdminServiceUtils::clear_user_accounts(user);
|
||||
}
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Could not find user");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::set_user_exchange_routing_data(const api::admin::ExchangeUserDataAPIArgument& user_exchange_routing_data,
|
||||
const api::Response<::bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::BTSUser* user = AdminServiceUtils::find_user(_state, user_exchange_routing_data.user_id());
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
if (user != nullptr){
|
||||
AdminServiceUtils::set_user_exchange_data(user, user_exchange_routing_data.complete_data());
|
||||
}
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Could not find user");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::set_user_md_entitlement_data(const bts::api::admin::ExchangeUserMarketDataEntitlementDataAPIArgument& user_md_entitlement_data,
|
||||
const bts::api::Response<::bts::api::admin::AdminServiceOperationResult>& reply){
|
||||
bts::api::admin::BTSUser* user = AdminServiceUtils::find_user(_state, user_md_entitlement_data.user_id());
|
||||
bts::api::admin::AdminServiceOperationResult result; result.set_is_success(true);
|
||||
if (user != nullptr){
|
||||
AdminServiceUtils::set_user_md_entitlement_data(user, user_md_entitlement_data.complete_data());
|
||||
}
|
||||
else{
|
||||
result.set_is_success(false);
|
||||
result.set_error_text("Could not find user");
|
||||
}
|
||||
_update_and_publish(false);
|
||||
reply(result);
|
||||
}
|
||||
void AdminServiceServer::get_admin_data(const bts::api::VoidMessage&,
|
||||
const api::Response<::bts::api::admin::AdminData>& reply){
|
||||
reply(_state);
|
||||
|
||||
Reference in new issue
Block a user