mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-11-01 02:57:02 +08:00 
			
		
		
		
	feat(payments): add api locking for payments core (#1898)
This commit is contained in:
		 Abhishek Marrivagu
					Abhishek Marrivagu
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							a48f9865bc
						
					
				
				
					commit
					5d66156132
				
			| @ -1,6 +1,8 @@ | ||||
| use actix_multipart::Multipart; | ||||
| use actix_web::{web, HttpRequest, HttpResponse}; | ||||
| use router_env::{instrument, tracing, Flow}; | ||||
|  | ||||
| use crate::core::api_locking; | ||||
| pub mod transformers; | ||||
|  | ||||
| use super::app::AppState; | ||||
| @ -44,10 +46,10 @@ pub async fn files_create( | ||||
|         create_file_request, | ||||
|         |state, auth, req| files_create_core(state, auth.merchant_account, auth.key_store, req), | ||||
|         auth::auth_type(&auth::ApiKeyAuth, &auth::JWTAuth, req.headers()), | ||||
|         api_locking::LockAction::NotApplicable, | ||||
|     ) | ||||
|     .await | ||||
| } | ||||
|  | ||||
| /// Files - Delete | ||||
| /// | ||||
| /// To delete a file | ||||
| @ -82,10 +84,10 @@ pub async fn files_delete( | ||||
|         file_id, | ||||
|         |state, auth, req| files_delete_core(state, auth.merchant_account, req), | ||||
|         auth::auth_type(&auth::ApiKeyAuth, &auth::JWTAuth, req.headers()), | ||||
|         api_locking::LockAction::NotApplicable, | ||||
|     ) | ||||
|     .await | ||||
| } | ||||
|  | ||||
| /// Files - Retrieve | ||||
| /// | ||||
| /// To retrieve a file | ||||
| @ -120,6 +122,7 @@ pub async fn files_retrieve( | ||||
|         file_id, | ||||
|         |state, auth, req| files_retrieve_core(state, auth.merchant_account, auth.key_store, req), | ||||
|         auth::auth_type(&auth::ApiKeyAuth, &auth::JWTAuth, req.headers()), | ||||
|         api_locking::LockAction::NotApplicable, | ||||
|     ) | ||||
|     .await | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user