feat(core): introduce accounts schema for accounts related tables (#7113)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Hrithikesh
2025-02-14 18:11:06 +05:30
committed by GitHub
parent 0b972e38ab
commit 0ba4ccfc8b
26 changed files with 308 additions and 56 deletions

View File

@ -1462,7 +1462,7 @@ pub async fn create_org_merchant_for_user(
) -> UserResponse<()> {
let db_organization = ForeignFrom::foreign_from(req.clone());
let org: diesel_models::organization::Organization = state
.store
.accounts_store
.insert_organization(db_organization)
.await
.change_context(UserErrors::InternalServerError)?;
@ -1548,7 +1548,7 @@ pub async fn list_user_roles_details(
.collect::<HashSet<_>>();
let org_name = state
.store
.accounts_store
.find_organization_by_org_id(&user_from_token.org_id)
.await
.change_context(UserErrors::InternalServerError)
@ -2837,7 +2837,7 @@ pub async fn list_orgs_for_user(
let resp = futures::future::try_join_all(
orgs.iter()
.map(|org_id| state.store.find_organization_by_org_id(org_id)),
.map(|org_id| state.accounts_store.find_organization_by_org_id(org_id)),
)
.await
.change_context(UserErrors::InternalServerError)?