diff --git a/Cargo.lock b/Cargo.lock index 2986338..c1ad90f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1089,7 +1089,7 @@ dependencies = [ [[package]] name = "golgi" version = "0.1.4" -source = "git+https://git.coopcloud.tech/golgi-ssb/golgi.git#ca4c1114ddf328b818144c5a1af0187b1357e9be" +source = "git+https://git.coopcloud.tech/golgi-ssb/golgi#ca4c1114ddf328b818144c5a1af0187b1357e9be" dependencies = [ "async-std", "async-stream 0.3.3", diff --git a/peach-config/src/set_permissions.rs b/peach-config/src/set_permissions.rs index 355e24f..0ad2ac8 100644 --- a/peach-config/src/set_permissions.rs +++ b/peach-config/src/set_permissions.rs @@ -1,17 +1,17 @@ use lazy_static::lazy_static; -use peach_lib::config_manager::get_config_value; +use peach_lib::config_manager; use crate::error::PeachConfigError; use crate::utils::cmd; lazy_static! { - pub static ref PEACH_CONFIGDIR: String = get_config_value("PEACH_CONFIGDIR") + pub static ref PEACH_CONFIGDIR: String = config_manager::get_config_value("PEACH_CONFIGDIR") .expect("Failed to load config value for PEACH_CONFIGDIR"); pub static ref PEACH_WEBDIR: String = - get_config_value("PEACH_WEBDIR").expect("Failed to load config value for PEACH_WEBDIR"); + config_manager::get_config_value("PEACH_WEBDIR").expect("Failed to load config value for PEACH_WEBDIR"); pub static ref PEACH_HOMEDIR: String = - get_config_value("PEACH_HOMEDIR").expect("Failed to load config value for PEACH_HOMEDIR"); + config_manager::get_config_value("PEACH_HOMEDIR").expect("Failed to load config value for PEACH_HOMEDIR"); } /// Utility function to set correct file permissions on the PeachCloud device. diff --git a/peach-web/src/utils/sbot.rs b/peach-web/src/utils/sbot.rs index 65a4ebd..98ab413 100644 --- a/peach-web/src/utils/sbot.rs +++ b/peach-web/src/utils/sbot.rs @@ -15,7 +15,7 @@ use golgi::{ api::friends::RelationshipQuery, blobs, messages::SsbMessageValue, sbot::Keystore, Sbot, }; use log::debug; -use peach_lib::config_manager::get_config_value; +use peach_lib::config_manager; use peach_lib::sbot::SbotConfig; use rouille::input::post::BufferedFile; use temporary::Directory; @@ -29,7 +29,7 @@ pub fn systemctl_sbot_cmd(cmd: &str) -> Result { let output = Command::new("sudo") .arg("systemctl") .arg(cmd) - .arg(get_config_value("GO_SBOT_SERVICE")?) + .arg(config_manager::get_config_value("GO_SBOT_SERVICE")?) .output()?; Ok(output) } @@ -69,7 +69,10 @@ pub async fn init_sbot_with_config( ) -> Result { debug!("Initialising an sbot client with configuration parameters"); // initialise sbot connection with ip:port and shscap from config file - let key_path = format!("{}/secret", get_config_value("GO_SBOT_DATADIR")?); + let key_path = format!( + "{}/secret", + config_manager::get_config_value("GO_SBOT_DATADIR")? + ); let sbot_client = match sbot_config { // TODO: panics if we pass `Some(conf.shscap)` as second arg Some(conf) => {