feat(payments): add api locking for payments core (#1898)

This commit is contained in:
Abhishek Marrivagu
2023-09-25 15:55:39 +05:30
committed by GitHub
parent a48f9865bc
commit 5d66156132
44 changed files with 802 additions and 158 deletions

View File

@ -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
}