mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
fix(routing): fix routing routes to deserialise correctly (#5724)
This commit is contained in:
@ -428,18 +428,15 @@ pub async fn retrieve_routing_algorithm_from_algorithm_id(
|
||||
state: SessionState,
|
||||
merchant_account: domain::MerchantAccount,
|
||||
key_store: domain::MerchantKeyStore,
|
||||
algorithm_id: routing_types::RoutingAlgorithmId,
|
||||
algorithm_id: String,
|
||||
) -> RouterResponse<routing_types::MerchantRoutingAlgorithm> {
|
||||
metrics::ROUTING_RETRIEVE_CONFIG.add(&metrics::CONTEXT, 1, &[]);
|
||||
let db = state.store.as_ref();
|
||||
let key_manager_state = &(&state).into();
|
||||
|
||||
let routing_algorithm = RoutingAlgorithmUpdate::fetch_routing_algo(
|
||||
merchant_account.get_id(),
|
||||
&algorithm_id.routing_algorithm_id,
|
||||
db,
|
||||
)
|
||||
.await?;
|
||||
let routing_algorithm =
|
||||
RoutingAlgorithmUpdate::fetch_routing_algo(merchant_account.get_id(), &algorithm_id, db)
|
||||
.await?;
|
||||
core_utils::validate_and_get_business_profile(
|
||||
db,
|
||||
key_manager_state,
|
||||
@ -464,7 +461,7 @@ pub async fn retrieve_routing_algorithm_from_algorithm_id(
|
||||
state: SessionState,
|
||||
merchant_account: domain::MerchantAccount,
|
||||
key_store: domain::MerchantKeyStore,
|
||||
algorithm_id: routing_types::RoutingAlgorithmId,
|
||||
algorithm_id: String,
|
||||
) -> RouterResponse<routing_types::MerchantRoutingAlgorithm> {
|
||||
metrics::ROUTING_RETRIEVE_CONFIG.add(&metrics::CONTEXT, 1, &[]);
|
||||
let db = state.store.as_ref();
|
||||
@ -472,7 +469,7 @@ pub async fn retrieve_routing_algorithm_from_algorithm_id(
|
||||
|
||||
let routing_algorithm = db
|
||||
.find_routing_algorithm_by_algorithm_id_merchant_id(
|
||||
&algorithm_id.routing_algorithm_id,
|
||||
&algorithm_id,
|
||||
merchant_account.get_id(),
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user