Skip to content

Commit

Permalink
fix: Fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak1799 committed Dec 5, 2024
1 parent 535532c commit f5454d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
26 changes: 0 additions & 26 deletions crates/api_models/src/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,32 +635,6 @@ impl DynamicRoutingAlgorithmRef {
}
}

impl EliminationRoutingAlgorithm {
pub fn new(
algorithm_id_with_timestamp: DynamicAlgorithmWithTimestamp<
common_utils::id_type::RoutingId,
>,
) -> Self {
Self {
algorithm_id_with_timestamp,
enabled_feature: DynamicRoutingFeatures::None,
}
}
}

impl SuccessBasedAlgorithm {
pub fn new(
algorithm_id_with_timestamp: DynamicAlgorithmWithTimestamp<
common_utils::id_type::RoutingId,
>,
) -> Self {
Self {
algorithm_id_with_timestamp,
enabled_feature: DynamicRoutingFeatures::None,
}
}
}

#[derive(Debug, Default, Clone, Copy, serde::Serialize, serde::Deserialize)]
pub struct RoutingVolumeSplit {
pub routing_type: RoutingType,
Expand Down
3 changes: 2 additions & 1 deletion crates/router/src/core/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ pub async fn success_based_routing_update_configs(
Ok(service_api::ApplicationResponse::Json(new_record))
}

#[cfg(feature = "v1")]
#[cfg(all(feature = "v1", feature = "dynamic_routing"))]
pub async fn contract_based_dynamic_routing_setup(
state: SessionState,
key_store: domain::MerchantKeyStore,
Expand Down Expand Up @@ -1474,6 +1474,7 @@ pub async fn contract_based_dynamic_routing_setup(
let mut dynamic_routing_algo_ref = routing_types::DynamicRoutingAlgorithmRef {
success_based_algorithm: None,
elimination_routing_algorithm: None,
dynamic_routing_volume_split: None,
contract_based_routing: Some(contract_algo),
};

Expand Down

0 comments on commit f5454d6

Please sign in to comment.