use std::{fs::File, path::PathBuf}; use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize, Default)] pub struct GlobalConfig { pub brand: String, pub slogan: String, pub icon: PathBuf, pub asset_dir: PathBuf, pub database_path: PathBuf, pub library_path: PathBuf, pub admin_username: String, pub admin_password: String, pub cookie_key: String, } pub fn load_global_config() -> GlobalConfig { serde_json::from_reader(File::open("data/config.json").unwrap()).unwrap() }