mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 05:17:02 +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:
@ -4,7 +4,7 @@ use router_env::{instrument, tracing};
|
||||
|
||||
use crate::{
|
||||
core::errors::{self, RouterResponse, StorageErrorExt},
|
||||
routes::AppState,
|
||||
routes::SessionState,
|
||||
services::ApplicationResponse,
|
||||
types::{api, domain, storage, transformers::ForeignTryFrom},
|
||||
utils::{OptionExt, StringExt},
|
||||
@ -20,7 +20,7 @@ enum MerchantAccountOrBusinessProfile {
|
||||
|
||||
#[instrument(skip(state))]
|
||||
pub async fn list_initial_delivery_attempts(
|
||||
state: AppState,
|
||||
state: SessionState,
|
||||
merchant_id_or_profile_id: String,
|
||||
constraints: api::webhook_events::EventListConstraints,
|
||||
) -> RouterResponse<Vec<api::webhook_events::EventListItemResponse>> {
|
||||
@ -108,7 +108,7 @@ pub async fn list_initial_delivery_attempts(
|
||||
|
||||
#[instrument(skip(state))]
|
||||
pub async fn list_delivery_attempts(
|
||||
state: AppState,
|
||||
state: SessionState,
|
||||
merchant_id_or_profile_id: String,
|
||||
initial_attempt_id: String,
|
||||
) -> RouterResponse<Vec<api::webhook_events::EventRetrieveResponse>> {
|
||||
@ -157,7 +157,7 @@ pub async fn list_delivery_attempts(
|
||||
|
||||
#[instrument(skip(state))]
|
||||
pub async fn retry_delivery_attempt(
|
||||
state: AppState,
|
||||
state: SessionState,
|
||||
merchant_id_or_profile_id: String,
|
||||
event_id: String,
|
||||
) -> RouterResponse<api::webhook_events::EventRetrieveResponse> {
|
||||
@ -254,7 +254,7 @@ pub async fn retry_delivery_attempt(
|
||||
}
|
||||
|
||||
async fn determine_identifier_and_get_key_store(
|
||||
state: AppState,
|
||||
state: SessionState,
|
||||
merchant_id_or_profile_id: String,
|
||||
) -> errors::RouterResult<(MerchantAccountOrBusinessProfile, domain::MerchantKeyStore)> {
|
||||
let store = state.store.as_ref();
|
||||
|
||||
Reference in New Issue
Block a user