From f48c4a29033e4f7cd562e831b71f7d23a74c063d Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 5 Jan 2025 19:21:47 +0100 Subject: [PATCH] feat: [#658] new repository method to get all user profiles --- src/services/user.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/services/user.rs b/src/services/user.rs index fd9ab995..317187bf 100644 --- a/src/services/user.rs +++ b/src/services/user.rs @@ -412,6 +412,15 @@ impl DbUserProfileRepository { pub async fn get_user_profile_from_username(&self, username: &str) -> Result { 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, Error> { + self.database.get_user_profiles().await + } } pub struct DbBannedUserList {