Server overhaul: shared helpers, dead code, synchronous tasks::start, stale comments
crate::lock replaces three poison-tolerant lock helpers; the rate limiter reuses auth::bearer_token; the landing page reuses invites::display_code. Removed: AppError::not_implemented (D-004 placeholder, only its own test used it) and the unused Mutation::mutation_id/entity_type. tasks::start never awaited or failed: now a plain fn returning AppState. Milestone-ownership comments (M2a/M3/M4) rewritten to say what the code does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
@@ -131,22 +131,6 @@ pub enum Mutation {
|
||||
Settlement(SettlementMutation),
|
||||
}
|
||||
|
||||
impl Mutation {
|
||||
pub fn mutation_id(&self) -> Uuid {
|
||||
match self {
|
||||
Self::Expense(m) => m.mutation_id,
|
||||
Self::Settlement(m) => m.mutation_id,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn entity_type(&self) -> EntityType {
|
||||
match self {
|
||||
Self::Expense(_) => EntityType::Expense,
|
||||
Self::Settlement(_) => EntityType::Settlement,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// E-32 `POST /sync` request: 1 to 100 mutations (more is 422 `batch_too_large`).
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)]
|
||||
pub struct SyncPushRequest {
|
||||
|
||||
Reference in New Issue
Block a user