mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
feat(multitenancy): add support for multitenancy and handle the same in router, producer, consumer, drainer and analytics (#4630)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
@ -9,7 +9,7 @@ use crate::{
|
||||
configs::settings,
|
||||
consts,
|
||||
core::errors::{self, RouterResponse, StorageErrorExt},
|
||||
routes::{metrics, AppState},
|
||||
routes::{metrics, SessionState},
|
||||
services::ApplicationResponse,
|
||||
types::{api, storage, transformers::ForeignInto},
|
||||
utils,
|
||||
@ -110,7 +110,7 @@ impl PlaintextApiKey {
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn create_api_key(
|
||||
state: AppState,
|
||||
state: SessionState,
|
||||
api_key: api::CreateApiKeyRequest,
|
||||
merchant_id: String,
|
||||
) -> RouterResponse<api::CreateApiKeyResponse> {
|
||||
@ -244,7 +244,7 @@ pub async fn add_api_key_expiry_task(
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn retrieve_api_key(
|
||||
state: AppState,
|
||||
state: SessionState,
|
||||
merchant_id: &str,
|
||||
key_id: &str,
|
||||
) -> RouterResponse<api::RetrieveApiKeyResponse> {
|
||||
@ -261,7 +261,7 @@ pub async fn retrieve_api_key(
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn update_api_key(
|
||||
state: AppState,
|
||||
state: SessionState,
|
||||
api_key: api::UpdateApiKeyRequest,
|
||||
) -> RouterResponse<api::RetrieveApiKeyResponse> {
|
||||
let merchant_id = api_key.merchant_id.clone();
|
||||
@ -395,7 +395,7 @@ pub async fn update_api_key_expiry_task(
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn revoke_api_key(
|
||||
state: AppState,
|
||||
state: SessionState,
|
||||
merchant_id: &str,
|
||||
key_id: &str,
|
||||
) -> RouterResponse<api::RevokeApiKeyResponse> {
|
||||
@ -463,7 +463,7 @@ pub async fn revoke_api_key_expiry_task(
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn list_api_keys(
|
||||
state: AppState,
|
||||
state: SessionState,
|
||||
merchant_id: String,
|
||||
limit: Option<i64>,
|
||||
offset: Option<i64>,
|
||||
|
||||
Reference in New Issue
Block a user