diff options
Diffstat (limited to 'common/src')
-rw-r--r-- | common/src/config.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/common/src/config.rs b/common/src/config.rs index a520fe0..7328d6e 100644 --- a/common/src/config.rs +++ b/common/src/config.rs @@ -20,10 +20,10 @@ pub struct GlobalConfig { #[serde(default = "default::temp_path")] pub temp_path: PathBuf, #[serde(default = "default::cache_path")] pub cache_path: PathBuf, #[serde(default = "default::media_path")] pub media_path: PathBuf, - #[serde(default = "default::admin_username")] pub admin_username: String, #[serde(default = "default::transcoding_profiles")] pub transcoding_profiles: Vec<EncodingProfile>, #[serde(default = "default::max_in_memory_cache_size")] pub max_in_memory_cache_size: usize, - pub admin_password: String, + #[serde(default)] pub admin_username: Option<String>, + #[serde(default)] pub admin_password: Option<String>, #[serde(default)] pub cookie_key: Option<String>, #[serde(default)] pub session_key: Option<String>, #[serde(default = "default::login_expire")] pub login_expire: i64, @@ -33,13 +33,9 @@ pub struct GlobalConfig { } mod default { - use std::path::PathBuf; - use crate::jhls::EncodingProfile; + use std::path::PathBuf; - pub fn admin_username() -> String { - "admin".into() - } pub fn login_expire() -> i64 { 60 * 60 * 24 } |