Skip to content

Commit

Permalink
feat: [#658] new repository method to get all user profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-nt committed Jan 5, 2025
1 parent 9d5c639 commit f48c4a2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/services/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,15 @@ impl DbUserProfileRepository {
pub async fn get_user_profile_from_username(&self, username: &str) -> Result<UserProfile, Error> {
self.database.get_user_profile_from_username(username).await
}

/// It gets all the user profiles for all the users.
///
/// # Errors
///
/// It returns an error if there is a database error.
pub async fn get_all_user_profiles(&self) -> Result<Vec<UserProfile>, Error> {
self.database.get_user_profiles().await
}
}

pub struct DbBannedUserList {
Expand Down

0 comments on commit f48c4a2

Please sign in to comment.