Load restapi config instead of using default:
|
let config = dingir_exchange::restapi::config::Settings::default(); |
Relate:
|
.service(if user_map.manage_channel.is_some() { |
|
web::scope("/manage").service( |
|
web::scope("/market") |
|
.route("/reload", web::post().to(market::reload)) |
|
.route("/tradepairs", web::post().to(market::add_pair)) |
|
.route("/assets", web::post().to(market::add_assets)), |
|
) |
|
} else { |
|
web::scope("/manage") |
|
.service(web::resource("/").to(|| HttpResponse::Forbidden().body(String::from("No manage endpoint")))) |
|
}), |
|
let mut rpc_cli = matchengine_client::MatchengineClient::new(app_state.manage_channel.as_ref().unwrap().clone()); |