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:
@@ -1,5 +1,6 @@
|
||||
pub mod analyze;
|
||||
pub mod auth;
|
||||
pub mod case_id;
|
||||
pub mod config;
|
||||
pub mod error;
|
||||
pub mod gazetteer;
|
||||
|
||||
Reference in New Issue
Block a user