refactor/tighten-architecture #26

Merged
GKaszewski merged 104 commits from refactor/tighten-architecture into master 2026-10-26 09:36:27 +00:00
6 changed files with 6 additions and 4 deletions
Showing only changes of commit 07c8b011d8 - Show all commits

View File

@@ -1,2 +0,0 @@
mod api_handlers;
mod context;

View File

@@ -58,10 +58,14 @@ impl UserRepository for InMemoryStore {
Ok(self.users.read().unwrap().get(&id.value()).cloned()) Ok(self.users.read().unwrap().get(&id.value()).cloned())
} }
/// Ordered by email ascending like the real query. Diary stats are stubbed
/// (review count 0, no last activity); only the identity fields are real.
async fn list_with_stats(&self) -> Result<Vec<UserSummary>, DomainError> { async fn list_with_stats(&self) -> Result<Vec<UserSummary>, DomainError> {
let store = self.users.read().unwrap(); let store = self.users.read().unwrap();
Ok(store let mut users: Vec<_> = store.values().collect();
.values() users.sort_by(|a, b| a.email().value().cmp(b.email().value()));
Ok(users
.into_iter()
.map(|u| { .map(|u| {
UserSummary::new( UserSummary::new(
u.id().clone(), u.id().clone(),