rename data_store to datastore
This commit is contained in:
		| @ -5,8 +5,14 @@ use crate::api::schema::*; | |||||||
| use crate::api::router::*; | use crate::api::router::*; | ||||||
| use serde_json::{json, Value}; | use serde_json::{json, Value}; | ||||||
|  |  | ||||||
|  | use crate::config::datastore; | ||||||
|  |  | ||||||
| fn datastore_list(param: Value, _info: &ApiMethod) -> Result<Value, Error> { | fn datastore_list(param: Value, _info: &ApiMethod) -> Result<Value, Error> { | ||||||
|     println!("This is a test {}", param); |     println!("This is a test {}", param); | ||||||
|  |  | ||||||
|  |     let config = datastore::config().unwrap(); | ||||||
|  |      | ||||||
|  |      | ||||||
|     Ok(json!({})) |     Ok(json!({})) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | |||||||
| @ -34,7 +34,7 @@ fn init() -> SectionConfig { | |||||||
| 
 | 
 | ||||||
| const DATASTORE_CFG_FILENAME: &str = "/etc/proxmox-backup/datastore.cfg"; | const DATASTORE_CFG_FILENAME: &str = "/etc/proxmox-backup/datastore.cfg"; | ||||||
| 
 | 
 | ||||||
| fn config() -> Result<SectionConfigData, Error> { | pub fn config() -> Result<SectionConfigData, Error> { | ||||||
| 
 | 
 | ||||||
|     let mut file = match OpenOptions::new() |     let mut file = match OpenOptions::new() | ||||||
|         .create(true) |         .create(true) | ||||||
| @ -37,7 +37,7 @@ pub mod backup { | |||||||
|  |  | ||||||
| pub mod config { | pub mod config { | ||||||
|  |  | ||||||
|     pub mod data_store; |     pub mod datastore; | ||||||
| } | } | ||||||
|  |  | ||||||
| pub mod storage { | pub mod storage { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user