Refactor analysis input building

Extract the logic for building `AnalysisInput` into a new function
`build_analysis_input`. This function encapsulates the process of
collecting recordings, reading transcripts, and determining the last
recording modification time.

This change improves code organization and reusability by centralizing
the input building logic.
This commit is contained in:
2026-04-15 21:16:32 +02:00
parent 1fa737a2e6
commit 7bcd94f0d0
2 changed files with 71 additions and 52 deletions
+12
View File
@@ -25,6 +25,12 @@ pub struct AuthenticatedUser {
pub data_dir: PathBuf,
}
impl AuthenticatedUser {
pub fn is_admin(&self) -> bool {
self.role == "admin"
}
}
impl<S> FromRequestParts<S> for AuthenticatedUser
where
S: Send + Sync,
@@ -72,6 +78,12 @@ pub struct AuthenticatedWebUser {
pub data_dir: PathBuf,
}
impl AuthenticatedWebUser {
pub fn is_admin(&self) -> bool {
self.role == "admin"
}
}
impl<S> FromRequestParts<S> for AuthenticatedWebUser
where
S: Send + Sync,