refactor(users): move roles schema to global interface (#6862)

This commit is contained in:
Apoorv Dixit
2024-12-19 18:34:04 +05:30
committed by GitHub
parent 607424992a
commit 2d8af88204
7 changed files with 21 additions and 20 deletions

View File

@ -190,7 +190,7 @@ pub async fn get_most_specific_theme_using_lineage(
lineage: ThemeLineage,
) -> UserResult<Option<Theme>> {
match state
.global_store
.store
.find_most_specific_theme_in_lineage(lineage)
.await
{
@ -210,7 +210,7 @@ pub async fn get_theme_using_optional_theme_id(
theme_id: Option<String>,
) -> UserResult<Option<Theme>> {
match theme_id
.async_map(|theme_id| state.global_store.find_theme_by_theme_id(theme_id))
.async_map(|theme_id| state.store.find_theme_by_theme_id(theme_id))
.await
.transpose()
{

View File

@ -57,7 +57,7 @@ pub async fn validate_role_name(
// TODO: Create and use find_by_role_name to make this efficient
let is_present_in_custom_roles = state
.store
.global_store
.list_all_roles(merchant_id, org_id)
.await
.change_context(UserErrors::InternalServerError)?