WIP
This commit is contained in:
parent
0f8933e259
commit
ad7cd98d85
1 changed files with 9 additions and 8 deletions
|
@ -289,7 +289,7 @@ fn create_new_server_config(
|
||||||
network: server::Network {
|
network: server::Network {
|
||||||
protocol: match protocol.as_str() {
|
protocol: match protocol.as_str() {
|
||||||
"http" => Some(server::HttpProtocol::Http),
|
"http" => Some(server::HttpProtocol::Http),
|
||||||
_ => Some(server::HttpProtocol::Https),
|
_ => None,
|
||||||
},
|
},
|
||||||
host,
|
host,
|
||||||
port: default_yml
|
port: default_yml
|
||||||
|
@ -342,20 +342,21 @@ fn create_new_server_config(
|
||||||
None => None,
|
None => None,
|
||||||
},
|
},
|
||||||
password: match redis.get(&Yaml::String("pass".to_string())) {
|
password: match redis.get(&Yaml::String("pass".to_string())) {
|
||||||
Some(user) => Some(
|
Some(pass) => Some(
|
||||||
user.as_str()
|
pass.as_str()
|
||||||
.ok_or(Error::InvalidConfig("redis.pass"))?
|
.ok_or(Error::InvalidConfig("redis.pass"))?
|
||||||
.to_string(),
|
.to_string(),
|
||||||
),
|
),
|
||||||
None => None,
|
None => None,
|
||||||
},
|
},
|
||||||
index: match redis.get(&Yaml::String("db".to_string())) {
|
index: match redis.get(&Yaml::String("db".to_string())) {
|
||||||
Some(user) => Some(user.as_i64().ok_or(Error::InvalidConfig("redis.db"))? as u8),
|
Some(db) => Some(db.as_i64().ok_or(Error::InvalidConfig("redis.db"))? as u8),
|
||||||
None => None,
|
None => None,
|
||||||
},
|
},
|
||||||
prefix: match redis.get(&Yaml::String("prefix".to_string())) {
|
prefix: match redis.get(&Yaml::String("prefix".to_string())) {
|
||||||
Some(user) => Some(
|
Some(prefix) => Some(
|
||||||
user.as_str()
|
prefix
|
||||||
|
.as_str()
|
||||||
.ok_or(Error::InvalidConfig("redis.prefix"))?
|
.ok_or(Error::InvalidConfig("redis.prefix"))?
|
||||||
.to_string(),
|
.to_string(),
|
||||||
),
|
),
|
||||||
|
@ -375,8 +376,8 @@ fn create_new_server_config(
|
||||||
None => None,
|
None => None,
|
||||||
},
|
},
|
||||||
fingerprint: match id.get(&Yaml::String("fingerprint".to_string())) {
|
fingerprint: match id.get(&Yaml::String("fingerprint".to_string())) {
|
||||||
Some(length) => Some(
|
Some(fingerprint) => Some(
|
||||||
length
|
fingerprint
|
||||||
.as_str()
|
.as_str()
|
||||||
.ok_or(Error::InvalidConfig("cuid.fingerprint"))?
|
.ok_or(Error::InvalidConfig("cuid.fingerprint"))?
|
||||||
.to_string(),
|
.to_string(),
|
||||||
|
|
Loading…
Reference in a new issue