feat: add endpoint to retrieve a public list of all users
All checks were successful
Build and Deploy Thoughts / build-and-deploy-local (push) Successful in 1m13s

This commit is contained in:
2025-09-09 02:28:00 +02:00
parent d15339cf4a
commit 863bc90c6f
3 changed files with 48 additions and 1 deletions

View File

@@ -165,3 +165,10 @@ pub async fn get_followers(db: &DbConn, user_id: Uuid) -> Result<Vec<user::Model
}
get_users_by_ids(db, follower_ids).await
}
pub async fn get_all_users(db: &DbConn) -> Result<Vec<user::Model>, DbErr> {
user::Entity::find()
.order_by_desc(user::Column::CreatedAt)
.all(db)
.await
}