feat(multitenancy): move users and tenants to global schema (#4781)

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:
Jagan
2024-06-05 18:50:40 +05:30
committed by GitHub
parent 76ec5e1e02
commit c5e28f2670
16 changed files with 278 additions and 86 deletions

View File

@ -57,7 +57,7 @@ impl UserFromToken {
pub async fn get_user_from_db(&self, state: &SessionState) -> UserResult<UserFromStorage> {
let user = state
.store
.global_store
.find_user_by_id(&self.user_id)
.await
.change_context(UserErrors::InternalServerError)?;
@ -180,7 +180,7 @@ pub async fn get_user_from_db_by_email(
email: domain::UserEmail,
) -> CustomResult<UserFromStorage, StorageError> {
state
.store
.global_store
.find_user_by_email(&email.into_inner())
.await
.map(UserFromStorage::from)