rename api3 back to api2
There is no real need to change the path, so using api2 we can reuse all helpers (like tools from proxmox widget toolkit).
This commit is contained in:
22
src/api2/config.rs
Normal file
22
src/api2/config.rs
Normal file
@ -0,0 +1,22 @@
|
||||
//use failure::*;
|
||||
//use std::collections::HashMap;
|
||||
|
||||
use crate::api::schema::*;
|
||||
use crate::api::router::*;
|
||||
use serde_json::{json};
|
||||
|
||||
pub mod datastore;
|
||||
|
||||
pub fn router() -> Router {
|
||||
|
||||
let route = Router::new()
|
||||
.get(ApiMethod::new(
|
||||
|_,_| Ok(json!([
|
||||
{"subdir": "datastore"}
|
||||
])),
|
||||
ObjectSchema::new("Directory index.")))
|
||||
.subdir("datastore", datastore::router());
|
||||
|
||||
|
||||
route
|
||||
}
|
Reference in New Issue
Block a user