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:
18
src/api2/admin.rs
Normal file
18
src/api2/admin.rs
Normal file
@ -0,0 +1,18 @@
|
||||
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