From 35d2d0b78976f3115e648bcba5bfd6982b40a987 Mon Sep 17 00:00:00 2001 From: "hyperswitch-bot[bot]" <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:28:49 +0000 Subject: [PATCH] chore: run formatter --- crates/router/src/core/user_role.rs | 11 +++++------ crates/router/src/utils/user.rs | 11 +++++++---- crates/router/src/utils/user_role.rs | 9 +++++---- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/crates/router/src/core/user_role.rs b/crates/router/src/core/user_role.rs index 01268231e13f..e67d55f4aa91 100644 --- a/crates/router/src/core/user_role.rs +++ b/crates/router/src/core/user_role.rs @@ -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( diff --git a/crates/router/src/utils/user.rs b/crates/router/src/utils/user.rs index 94326e71c661..0705bb8b8949 100644 --- a/crates/router/src/utils/user.rs +++ b/crates/router/src/utils/user.rs @@ -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 { diff --git a/crates/router/src/utils/user_role.rs b/crates/router/src/utils/user_role.rs index f0bfa617eff0..0026984fdb9a 100644 --- a/crates/router/src/utils/user_role.rs +++ b/crates/router/src/utils/user_role.rs @@ -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}, @@ -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