Skip to content

Commit

Permalink
chore: run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperswitch-bot[bot] committed Nov 29, 2023
1 parent 6cccedd commit 35d2d0b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
11 changes: 5 additions & 6 deletions crates/router/src/core/user_role.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
use crate::services::ApplicationResponse;
use crate::utils;
use crate::{routes::AppState, types::domain};
use api_models::{user as user_api, user_role as user_role_api};
use diesel_models::enums::UserStatus;
use diesel_models::user as storage;
use diesel_models::user_role::UserRoleUpdate;
use diesel_models::{enums::UserStatus, user as storage, user_role::UserRoleUpdate};
use error_stack::ResultExt;

use crate::{
consts,
core::errors::{UserErrors, UserResponse},
routes::AppState,
services::{
authentication::{self as auth},
authorization::{info, predefined_permissions},
ApplicationResponse,
},
types::domain,
utils,
};

pub async fn create_internal_user(
Expand Down
11 changes: 7 additions & 4 deletions crates/router/src/utils/user.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
use crate::core::errors::UserErrors;
use crate::services::authentication::UserFromToken;
use crate::types::domain::MerchantAccount;
use crate::{core::errors::UserResult, routes::AppState};
use error_stack::ResultExt;

use crate::{
core::errors::{UserErrors, UserResult},
routes::AppState,
services::authentication::UserFromToken,
types::domain::MerchantAccount,
};

pub mod password;

impl UserFromToken {
Expand Down
9 changes: 5 additions & 4 deletions crates/router/src/utils/user_role.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
use api_models::user_role as user_role_api;
use diesel_models::enums::UserStatus;
use error_stack::ResultExt;
use router_env::logger;

use crate::{
consts,
core::errors::{UserErrors, UserResult},
Expand All @@ -7,10 +12,6 @@ use crate::{
predefined_permissions::{self, RoleInfo},
},
};
use api_models::user_role as user_role_api;
use diesel_models::enums::UserStatus;
use error_stack::ResultExt;
use router_env::logger;

pub fn is_internal_role(role_id: &str) -> bool {
role_id == consts::user_role::ROLE_ID_INTERNAL_ADMIN
Expand Down

0 comments on commit 35d2d0b

Please sign in to comment.