arch: split ConfigRepository, extract polling, consolidate conversions, decouple protocol
- Value↔JSON: From impls on domain Value behind `json` feature, delete 4 duplicate converters - ConfigRepository split into ConfigRepository (12), UserRepository (3), WidgetStateCache (2) - polling orchestration moved from bootstrap to application::polling_service - WidgetRenderer in client-domain owns scroll/cache, both clients use it - network loop consolidated into client-application::run_connection_loop - protocol crate drops domain dep, Wire↔Domain conversions move to adapters
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use domain::{AuthPort, ConfigRepository, PasswordHashPort, User};
|
||||
use domain::{AuthPort, PasswordHashPort, User, UserRepository};
|
||||
|
||||
pub enum AuthError<E> {
|
||||
InvalidCredentials,
|
||||
@@ -26,7 +26,7 @@ pub async fn login<C, A, H>(
|
||||
password: &str,
|
||||
) -> Result<String, AuthError<C::Error>>
|
||||
where
|
||||
C: ConfigRepository,
|
||||
C: UserRepository,
|
||||
A: AuthPort,
|
||||
H: PasswordHashPort,
|
||||
{
|
||||
@@ -55,7 +55,7 @@ pub async fn register<C, H>(
|
||||
password: &str,
|
||||
) -> Result<(), AuthError<C::Error>>
|
||||
where
|
||||
C: ConfigRepository,
|
||||
C: UserRepository,
|
||||
H: PasswordHashPort,
|
||||
{
|
||||
let count = config.count_users().await.map_err(AuthError::Repository)?;
|
||||
|
||||
Reference in New Issue
Block a user