refactor(core): Add additional parameters in AppState and refactor AppState references (#2123)

Co-authored-by: Kritik Modi <kritik.modi@juspay.in>
Co-authored-by: Kritik Modi <61862301+kritikmodi@users.noreply.github.com>
Co-authored-by: Nitesh Balla <nitesh.balla@juspay.in>
This commit is contained in:
Abhishek Marrivagu
2023-09-18 14:01:03 +05:30
committed by GitHub
parent b39369ced9
commit a0a8ef27b3
46 changed files with 531 additions and 395 deletions

View File

@ -1865,7 +1865,7 @@ pub fn make_merchant_url_with_response(
}
pub async fn make_ephemeral_key(
state: &AppState,
state: AppState,
customer_id: String,
merchant_id: String,
) -> errors::RouterResponse<ephemeral_key::EphemeralKey> {
@ -1887,10 +1887,11 @@ pub async fn make_ephemeral_key(
}
pub async fn delete_ephemeral_key(
store: &dyn StorageInterface,
state: AppState,
ek_id: String,
) -> errors::RouterResponse<ephemeral_key::EphemeralKey> {
let ek = store
let db = state.store.as_ref();
let ek = db
.delete_ephemeral_key(&ek_id)
.await
.change_context(errors::ApiErrorResponse::InternalServerError)