diff --git a/src/api3/config/datastore.rs b/src/api3/config/datastore.rs index ee6e82aa..2e755512 100644 --- a/src/api3/config/datastore.rs +++ b/src/api3/config/datastore.rs @@ -5,8 +5,14 @@ use crate::api::schema::*; use crate::api::router::*; use serde_json::{json, Value}; +use crate::config::datastore; + fn datastore_list(param: Value, _info: &ApiMethod) -> Result { println!("This is a test {}", param); + + let config = datastore::config().unwrap(); + + Ok(json!({})) } diff --git a/src/config/data_store.rs b/src/config/datastore.rs similarity index 95% rename from src/config/data_store.rs rename to src/config/datastore.rs index c73234ac..62c9a14b 100644 --- a/src/config/data_store.rs +++ b/src/config/datastore.rs @@ -34,7 +34,7 @@ fn init() -> SectionConfig { const DATASTORE_CFG_FILENAME: &str = "/etc/proxmox-backup/datastore.cfg"; -fn config() -> Result { +pub fn config() -> Result { let mut file = match OpenOptions::new() .create(true) diff --git a/src/lib.rs b/src/lib.rs index 55b88080..c37a5015 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,7 +37,7 @@ pub mod backup { pub mod config { - pub mod data_store; + pub mod datastore; } pub mod storage {