refactor(server): introduce CaseId newtype with typed Path extractor

Replace five duplicated uuid::Uuid::parse_str calls in web handlers
(analyze, document view, delete, reset, case detail) with a
CaseIdPath extractor that validates the URL segment once and
returns the legacy "Invalid case_id" 400 body byte-for-byte.

The extractor uses axum's FromRequestParts and maps any failure
to AppError::BadRequest, so IntoResponse handling is unchanged.
This commit is contained in:
2026-04-19 15:05:46 +02:00
parent a1ff410d1b
commit 16c6fb2e07
4 changed files with 102 additions and 29 deletions
+1
View File
@@ -1,5 +1,6 @@
pub mod analyze;
pub mod auth;
pub mod case_id;
pub mod config;
pub mod error;
pub mod gazetteer;