refactor(permissions): Remove permissions for utility APIs (#3730)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Mani Chandra
2024-02-21 12:50:42 +05:30
committed by GitHub
parent f3b90ee17f
commit 4ae28e48cd
18 changed files with 179 additions and 118 deletions

View File

@ -48,13 +48,13 @@ impl UserFromToken {
Ok(merchant_account)
}
pub async fn get_user(&self, state: &AppState) -> UserResult<diesel_models::user::User> {
pub async fn get_user_from_db(&self, state: &AppState) -> UserResult<UserFromStorage> {
let user = state
.store
.find_user_by_id(&self.user_id)
.await
.change_context(UserErrors::InternalServerError)?;
Ok(user)
Ok(user.into())
}
}