use std::path::{Path, PathBuf}; use rocket::serde::Deserialize; use crate::constants::USERS_LIST_FILE; #[derive(Debug, Deserialize)] #[serde(crate = "rocket::serde")] pub struct AppConfig { storage_path: PathBuf, } impl AppConfig { pub fn storage_path(&self) -> &Path { self.storage_path.as_ref() } pub fn users_file(&self) -> PathBuf { self.storage_path.join(USERS_LIST_FILE) } }