mirror of
https://github.com/MidnightBlueLabs/tetra-bluestation.git
synced 2026-03-29 05:09:51 +00:00
Refactors in Brew config
- Brew config fields updated: - Enabled field now removed. - Internally, map config file to intermediary struct, then to StackConfig to be coherent with other config fields. - Remove brew user agent field, now derive that from version number + git commit hash: BlueStation/0.x.x/aabbccdd - Some small tweaks and improvements
This commit is contained in:
@@ -64,13 +64,11 @@ fn build_bs_stack(cfg: &mut SharedConfig) -> MessageRouter {
|
||||
router.register_entity(Box::new(cmce));
|
||||
|
||||
// Register Brew entity if enabled
|
||||
let brew_cfg = cfg.config().brew.clone();
|
||||
if brew_cfg.enabled {
|
||||
if let Some(brew_cfg) = cfg.config().brew.clone() {
|
||||
let brew_config = BrewConfig {
|
||||
host: brew_cfg.host,
|
||||
port: brew_cfg.port,
|
||||
tls: brew_cfg.tls,
|
||||
user_agent: brew_cfg.user_agent,
|
||||
username: brew_cfg.username,
|
||||
password: brew_cfg.password,
|
||||
issi: brew_cfg.issi,
|
||||
|
||||
Reference in New Issue
Block a user