mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
refactor(redis): invoke redis_conn() method instead of cloning redis_conn property in StorageInterface (#1552)
Co-authored-by: jeeva <jeeva.ramu@codurance.com> Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
@ -1175,7 +1175,12 @@ pub async fn make_pm_data<'a, F: Clone, R>(
|
||||
let request = &payment_data.payment_method_data;
|
||||
let token = payment_data.token.clone();
|
||||
let hyperswitch_token = if let Some(token) = token {
|
||||
let redis_conn = state.store.get_redis_conn();
|
||||
let redis_conn = state
|
||||
.store
|
||||
.get_redis_conn()
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)
|
||||
.attach_printable("Failed to get redis connection")?;
|
||||
|
||||
let key = format!(
|
||||
"pm_token_{}_{}_hyperswitch",
|
||||
token,
|
||||
|
||||
Reference in New Issue
Block a user