summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2024-04-10 00:16:55 +0200
committerFxQnLr <[email protected]>2024-04-10 00:16:55 +0200
commit3428a637ce420baef9aa9f9803e71bd587867005 (patch)
treea1ad8234ae9bf3709794324a41e38c2f7fa58d0d /src/config.rs
parent907e5cb5bc48899b444f7fedd85af7b5974d9a2e (diff)
downloadwebol-3428a637ce420baef9aa9f9803e71bd587867005.tar
webol-3428a637ce420baef9aa9f9803e71bd587867005.tar.gz
webol-3428a637ce420baef9aa9f9803e71bd587867005.zip
Closes #24. Changed postgres to json directory storage
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 9636af4..124893b 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -5,7 +5,6 @@ use crate::auth;
5 5
6#[derive(Debug, Clone, Deserialize)] 6#[derive(Debug, Clone, Deserialize)]
7pub struct Config { 7pub struct Config {
8 pub database_url: String,
9 pub serveraddr: String, 8 pub serveraddr: String,
10 pub pingtimeout: i64, 9 pub pingtimeout: i64,
11 pub pingthreshold: i64, 10 pub pingthreshold: i64,
@@ -26,9 +25,10 @@ impl Config {
26 .set_default("pingtimeout", 10)? 25 .set_default("pingtimeout", 10)?
27 .set_default("pingthreshold", 1)? 26 .set_default("pingthreshold", 1)?
28 .set_default("timeoffset", 0)? 27 .set_default("timeoffset", 0)?
28 .set_default("auth.secret", "")?
29 .add_source(File::with_name("config.toml").required(false)) 29 .add_source(File::with_name("config.toml").required(false))
30 .add_source(File::with_name("config.dev.toml").required(false)) 30 .add_source(File::with_name("config.dev.toml").required(false))
31 .add_source(config::Environment::with_prefix("WEBOL").prefix_separator("_")) 31 .add_source(config::Environment::with_prefix("WEBOL").separator("_"))
32 .build()?; 32 .build()?;
33 33
34 config.try_deserialize() 34 config.try_deserialize()