From 07fd9d81353d43907df22b2555ef818b85987a6b Mon Sep 17 00:00:00 2001 From: "hyperswitch-bot[bot]" <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 12:33:23 +0000 Subject: [PATCH] chore: run formatter --- crates/api_models/src/events/customer.rs | 2 +- crates/router/src/core/payment_methods.rs | 42 +++++++++++------------ 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/crates/api_models/src/events/customer.rs b/crates/api_models/src/events/customer.rs index 1ebb0c74e1b5..993dad2af709 100644 --- a/crates/api_models/src/events/customer.rs +++ b/crates/api_models/src/events/customer.rs @@ -82,4 +82,4 @@ impl ApiEventMetric for CustomerId { .to_string(), }) } -} \ No newline at end of file +} diff --git a/crates/router/src/core/payment_methods.rs b/crates/router/src/core/payment_methods.rs index 42709f5fb817..f3dbcf7a1418 100644 --- a/crates/router/src/core/payment_methods.rs +++ b/crates/router/src/core/payment_methods.rs @@ -853,17 +853,16 @@ pub async fn create_payment_method( let customer_id = req.customer_id.to_owned(); let key_manager_state = &(state).into(); - db - .find_customer_by_global_id( - key_manager_state, - customer_id.get_string_repr(), - merchant_account.get_id(), - key_store, - merchant_account.storage_scheme, - ) - .await - .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound) - .attach_printable("Customer not found for the payment method")?; + db.find_customer_by_global_id( + key_manager_state, + customer_id.get_string_repr(), + merchant_account.get_id(), + key_store, + merchant_account.storage_scheme, + ) + .await + .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound) + .attach_printable("Customer not found for the payment method")?; let payment_method_billing_address: Option>> = req .billing @@ -973,17 +972,16 @@ pub async fn payment_method_intent_create( let customer_id = req.customer_id.to_owned(); let key_manager_state = &(state).into(); - db - .find_customer_by_global_id( - key_manager_state, - customer_id.get_string_repr(), - merchant_account.get_id(), - key_store, - merchant_account.storage_scheme, - ) - .await - .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound) - .attach_printable("Customer not found for the payment method")?; + db.find_customer_by_global_id( + key_manager_state, + customer_id.get_string_repr(), + merchant_account.get_id(), + key_store, + merchant_account.storage_scheme, + ) + .await + .to_not_found_response(errors::ApiErrorResponse::CustomerNotFound) + .attach_printable("Customer not found for the payment method")?; let payment_method_billing_address: Option>> = req .billing