Skip to content

Commit f48c4a2

Browse files
committed
feat: [#658] new repository method to get all user profiles
1 parent 9d5c639 commit f48c4a2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/services/user.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,15 @@ impl DbUserProfileRepository {
412412
pub async fn get_user_profile_from_username(&self, username: &str) -> Result<UserProfile, Error> {
413413
self.database.get_user_profile_from_username(username).await
414414
}
415+
416+
/// It gets all the user profiles for all the users.
417+
///
418+
/// # Errors
419+
///
420+
/// It returns an error if there is a database error.
421+
pub async fn get_all_user_profiles(&self) -> Result<Vec<UserProfile>, Error> {
422+
self.database.get_user_profiles().await
423+
}
415424
}
416425

417426
pub struct DbBannedUserList {

0 commit comments

Comments
 (0)