This commit is contained in:
2026-08-16 13:00:29 +02:00
parent e6d6968e52
commit 7fc8edd1d0
71 changed files with 2359 additions and 448 deletions
+23
View File
@@ -60,6 +60,9 @@ url = "sqlite://oxspeak.db"
# MySQL
# url = "mysql://user:passwd@localhost:3306/db_name"
[media]
root = "media"
[jwt]
secret = "changeme"
# Duration in seconds
@@ -72,6 +75,26 @@ pub struct AppConfig {
pub network: NetworkConfig,
pub database: DatabaseConfig,
pub jwt: JwtConfig,
#[serde(default)]
pub media: MediaConfig,
}
#[derive(Debug, Clone, Deserialize)]
pub struct MediaConfig {
#[serde(default = "default_media_root")]
pub root: String,
}
impl Default for MediaConfig {
fn default() -> Self {
Self {
root: default_media_root(),
}
}
}
fn default_media_root() -> String {
"media".to_string()
}
#[derive(Debug, Clone, Deserialize)]