mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	refactor(business_profile): use concrete types for JSON fields (#5531)
This commit is contained in:
		| @ -536,17 +536,12 @@ pub(crate) async fn add_outgoing_webhook_retry_task_to_process_tracker( | ||||
| fn get_webhook_url_from_business_profile( | ||||
|     business_profile: &diesel_models::business_profile::BusinessProfile, | ||||
| ) -> CustomResult<String, errors::WebhooksFlowError> { | ||||
|     let webhook_details_json = business_profile | ||||
|     let webhook_details = business_profile | ||||
|         .webhook_details | ||||
|         .clone() | ||||
|         .get_required_value("webhook_details") | ||||
|         .change_context(errors::WebhooksFlowError::MerchantWebhookDetailsNotFound)?; | ||||
|  | ||||
|     let webhook_details: api::WebhookDetails = | ||||
|         webhook_details_json | ||||
|             .parse_value("WebhookDetails") | ||||
|             .change_context(errors::WebhooksFlowError::MerchantWebhookDetailsNotFound)?; | ||||
|  | ||||
|     webhook_details | ||||
|         .webhook_url | ||||
|         .get_required_value("webhook_url") | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sanchith Hegde
					Sanchith Hegde