feat: GET /users (search/list) and GET /users/count
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user