mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
refactor(router): add parent caller function for DB (#3838)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
use error_stack::IntoReport;
|
||||
use router_env::{instrument, tracing};
|
||||
#[cfg(feature = "accounts_cache")]
|
||||
use storage_impl::redis::cache::CacheKind;
|
||||
#[cfg(feature = "accounts_cache")]
|
||||
@ -52,6 +53,7 @@ pub trait ApiKeyInterface {
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl ApiKeyInterface for Store {
|
||||
#[instrument(skip_all)]
|
||||
async fn insert_api_key(
|
||||
&self,
|
||||
api_key: storage::ApiKeyNew,
|
||||
@ -64,6 +66,7 @@ impl ApiKeyInterface for Store {
|
||||
.into_report()
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn update_api_key(
|
||||
&self,
|
||||
merchant_id: String,
|
||||
@ -113,6 +116,7 @@ impl ApiKeyInterface for Store {
|
||||
}
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn revoke_api_key(
|
||||
&self,
|
||||
merchant_id: &str,
|
||||
@ -156,6 +160,7 @@ impl ApiKeyInterface for Store {
|
||||
}
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn find_api_key_by_merchant_id_key_id_optional(
|
||||
&self,
|
||||
merchant_id: &str,
|
||||
@ -168,6 +173,7 @@ impl ApiKeyInterface for Store {
|
||||
.into_report()
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn find_api_key_by_hash_optional(
|
||||
&self,
|
||||
hashed_api_key: storage::HashedApiKey,
|
||||
@ -198,6 +204,7 @@ impl ApiKeyInterface for Store {
|
||||
}
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn list_api_keys_by_merchant_id(
|
||||
&self,
|
||||
merchant_id: &str,
|
||||
|
||||
Reference in New Issue
Block a user