mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
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:
committed by
GitHub
parent
b39369ced9
commit
a0a8ef27b3
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user