Command: grep -n -A 20 "async fn updateprofile" ./crates/router/src/core/admin.rs…
- User
Command: grep -n -A 20 "async fn update_profile" ./crates/router/src/core/admin.rs Output: 4578:pub async fn update_profile( 4579- state: SessionState, 4580- profile_id: &id_type::ProfileId, 4581- key_store: domain::MerchantKeyStore, 4582- request: api::ProfileUpdate, 4583-) -> RouterResponseapi::ProfileResponse { 4584- let db = state.store.as_ref(); 4585- let key_manager_state = &(&state).into(); 4586- 4587- let business_profile = db 4588- .find_business_profile_by_profile_id(key_manager_state, &key_store, profile_id) 4589- .await 4590- .to_not_found_response(errors::ApiErrorResponse::ProfileNotFound { 4591- id: profile_id.get_string_repr().to_owned(), 4592- })?; 4593- 4594- let profile_update = request 4595- .get_update_profile_object(&state, &key_store, &business_profile) 4596- .await?; 4597- 4598- let updated_business_profile = db
4643: pub async fn update_profile_and_invalidate_routing_config_for_active_algorithm_id_update( 4644- self, 4645- db: &dyn StorageInterface, 4646- key_manager_state: &KeyManagerState, 4647- merchant_key_store: &domain::MerchantKeyStore, 4648- algorithm_id: id_type::RoutingId, 4649- transaction_type: &storage::enums::TransactionType, 4650- ) -> RouterResult<()> { 4651- let routing_cache_key = self.clone().get_routing_config_cache_key(); 4652- 4653- let (routing_algorithm_id, payout_routing_algorithm_id) = match transaction_type { 4654- storage::enums::TransactionType::Payment => (Some(algorithm_id), None), 4655- #[cfg(feature = "payouts")] 4656- storage::enums::TransactionType::Payout => (None, Some(algorithm_id)), 4657- }; 4658- 4659- let profile_update = domain::ProfileUpdate::RoutingAlgorithmUpdate { 4660- routing_algorithm_id, 4661- payout_routing_algorithm_id, 4662- }; 4663-
Assistant
<is_displaying_contents> true </is_displaying_contents>