feat: GET /users (search/list) and GET /users/count

This commit is contained in:
2026-05-14 15:34:37 +02:00
parent a2cc4fba21
commit eb7dbb0aee
4 changed files with 62 additions and 1 deletions

View File

@@ -62,6 +62,9 @@ pub struct TestStore {
Ok(())
}
async fn list_with_stats(&self) -> Result<Vec<UserSummary>, DomainError> { Ok(vec![]) }
async fn count(&self) -> Result<i64, DomainError> {
Ok(self.users.lock().unwrap().iter().filter(|u| u.local).count() as i64)
}
}
#[async_trait] impl ThoughtRepository for TestStore {
@@ -211,6 +214,9 @@ pub struct TestStore {
async fn list_thoughts_by_tag(&self, _name: &str, _p: &PageParams) -> Result<Paginated<Thought>, DomainError> {
Ok(Paginated { items: vec![], total: 0, page: 1, per_page: 20 })
}
async fn popular_tags(&self, _limit: usize) -> Result<Vec<(String, i64)>, DomainError> {
Ok(vec![])
}
}
#[async_trait] impl ApiKeyRepository for TestStore {