feat: fetch merchant key store only once per session (#1400)

Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
Kartikeya Hegde
2023-06-22 14:40:28 +05:30
committed by GitHub
parent 957d5e0f62
commit d321aa1f72
65 changed files with 979 additions and 498 deletions

View File

@ -42,7 +42,7 @@ pub async fn files_create(
state.get_ref(),
&req,
create_file_request,
files_create_core,
|state, auth, req| files_create_core(state, auth.merchant_account, auth.key_store, req),
auth::auth_type(&auth::ApiKeyAuth, &auth::JWTAuth, req.headers()),
)
.await
@ -80,7 +80,7 @@ pub async fn files_delete(
state.get_ref(),
&req,
file_id,
files_delete_core,
|state, auth, req| files_delete_core(state, auth.merchant_account, req),
auth::auth_type(&auth::ApiKeyAuth, &auth::JWTAuth, req.headers()),
)
.await
@ -118,7 +118,7 @@ pub async fn files_retrieve(
state.get_ref(),
&req,
file_id,
files_retrieve_core,
|state, auth, req| files_retrieve_core(state, auth.merchant_account, auth.key_store, req),
auth::auth_type(&auth::ApiKeyAuth, &auth::JWTAuth, req.headers()),
)
.await