Feat: Add web interface for case listing and audio playback

Introduces a new web interface to list cases and play back audio
recordings. This includes:

- A new `web` module in `routes` to handle web requests.
- `handle_case_list` to scan and display available cases and their
  recordings.
- `handle_audio` to serve audio files, with validation to prevent path
  traversal and ensure correct file types.
- `AppError::NotFound` variant to handle missing resources gracefully.
- Updates to `projektplan.md` to document the change in STT container
  and m4a preprocessing.
- New tests in `server/tests/web_test.rs` to ensure the web interface
  functions correctly.
This commit is contained in:
2026-04-13 16:24:26 +02:00
parent ef6efec9f0
commit fbf8681df0
6 changed files with 443 additions and 0 deletions
+2
View File
@@ -5,6 +5,7 @@ use serde_json::json;
pub enum AppError {
Unauthorized,
BadRequest(String),
NotFound(String),
Internal(String),
}
@@ -13,6 +14,7 @@ impl IntoResponse for AppError {
let (status, message) = match &self {
Self::Unauthorized => (StatusCode::UNAUTHORIZED, "Unauthorized".to_owned()),
Self::BadRequest(msg) => (StatusCode::BAD_REQUEST, msg.clone()),
Self::NotFound(msg) => (StatusCode::NOT_FOUND, msg.clone()),
Self::Internal(msg) => (StatusCode::INTERNAL_SERVER_ERROR, msg.clone()),
};