diff --git a/bffhd/capnp/user.rs b/bffhd/capnp/user.rs index 72d540e..991c68f 100644 --- a/bffhd/capnp/user.rs +++ b/bffhd/capnp/user.rs @@ -371,13 +371,13 @@ impl card_d_e_s_fire_e_v2::Server for User { let _span = tracing::trace_span!(target: TARGET, "get_space_info").entered(); tracing::trace!("method call"); - let space = if let Some(space) = CONFIG.get().and_then(|c| c.spacename.as_ref()) { + let space = if let Some(space) = CONFIG.get().map(|c| c.spacename.as_str()) { space } else { return Promise::err(Error::failed("No space name configured".to_string())); }; - let url = if let Some(url) = CONFIG.get().and_then(|c| c.instanceurl.as_ref()) { + let url = if let Some(url) = CONFIG.get().map(|c| c.instanceurl.as_str()) { url } else { return Promise::err(Error::failed("No instance url configured".to_string())); diff --git a/bffhd/config/dhall.rs b/bffhd/config/dhall.rs index 8fb3bd9..8f04d04 100644 --- a/bffhd/config/dhall.rs +++ b/bffhd/config/dhall.rs @@ -168,8 +168,8 @@ impl Default for Config { tlskeylog: None, verbosity: 0, logging: LogConfig::default(), - instanceurl: None, - spacename: None, + instanceurl: "".into(), + spacename: "".into(), } } }