Refactor: Simplify case directory structure
The distinction between `open/` and `done/` directories for cases has been removed. All cases for a user now reside directly under the user's directory (e.g., `<data_path>/<slug>/<case_id>/`). This simplifies path management and eliminates redundant directory traversals. Key changes include: - Removed `open/` and `done/` subdirectories in path resolution. - Introduced a `paths::case_dir` function as a single source of truth for case directory layout. - Updated various modules (`recovery`, `auth`, `routes`, `transcribe`, `tests`) to use the new path structure. - Adjusted templates to reflect the simplified case status representation.
This commit is contained in:
+1
-2
@@ -59,8 +59,7 @@ where
|
||||
.ok_or(AppError::Unauthorized)?;
|
||||
|
||||
let data_dir = config.data_path.join(slug);
|
||||
tokio::fs::create_dir_all(data_dir.join("open")).await?;
|
||||
tokio::fs::create_dir_all(data_dir.join("done")).await?;
|
||||
tokio::fs::create_dir_all(&data_dir).await?;
|
||||
|
||||
Ok(Self {
|
||||
slug: slug.clone(),
|
||||
|
||||
Reference in New Issue
Block a user