mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 13:30:39 +08:00
feat: rename columns in organization for v2 (#5424)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -12,6 +12,8 @@ use common_utils::{
|
||||
types::keymanager::{self as km_types, KeyManagerState},
|
||||
};
|
||||
use diesel_models::configs;
|
||||
#[cfg(all(any(feature = "v1", feature = "v2"), feature = "olap"))]
|
||||
use diesel_models::organization::OrganizationBridge;
|
||||
use error_stack::{report, FutureExt, ResultExt};
|
||||
use futures::future::try_join_all;
|
||||
use masking::{ExposeInterface, PeekInterface, Secret};
|
||||
@ -134,7 +136,7 @@ pub async fn update_organization(
|
||||
req: api::OrganizationRequest,
|
||||
) -> RouterResponse<api::OrganizationResponse> {
|
||||
let organization_update = diesel_models::organization::OrganizationUpdate::Update {
|
||||
org_name: req.organization_name,
|
||||
organization_name: req.organization_name,
|
||||
organization_details: req.organization_details,
|
||||
metadata: req.metadata,
|
||||
};
|
||||
@ -387,7 +389,7 @@ impl MerchantAccountCreateBridge for api::MerchantAccountCreate {
|
||||
payout_routing_algorithm: self.payout_routing_algorithm,
|
||||
#[cfg(not(feature = "payouts"))]
|
||||
payout_routing_algorithm: None,
|
||||
organization_id: organization.org_id,
|
||||
organization_id: organization.get_organization_id(),
|
||||
is_recon_enabled: false,
|
||||
default_profile: None,
|
||||
recon_status: diesel_models::enums::ReconStatus::NotRequested,
|
||||
@ -638,7 +640,7 @@ impl MerchantAccountCreateBridge for api::MerchantAccountCreate {
|
||||
},
|
||||
)?;
|
||||
|
||||
CreateOrValidateOrganization::new(self.organization_id.clone())
|
||||
let organization = CreateOrValidateOrganization::new(self.organization_id.clone())
|
||||
.create_or_validate(db)
|
||||
.await?;
|
||||
|
||||
@ -692,7 +694,7 @@ impl MerchantAccountCreateBridge for api::MerchantAccountCreate {
|
||||
intent_fulfillment_time: None,
|
||||
frm_routing_algorithm: None,
|
||||
payout_routing_algorithm: None,
|
||||
organization_id: self.organization_id,
|
||||
organization_id: organization.get_organization_id(),
|
||||
is_recon_enabled: false,
|
||||
default_profile: None,
|
||||
recon_status: diesel_models::enums::ReconStatus::NotRequested,
|
||||
|
||||
Reference in New Issue
Block a user