22 lines
456 B
Rust
22 lines
456 B
Rust
|
use failure::*;
|
||
|
use std::collections::HashMap;
|
||
|
|
||
|
use crate::api::schema::*;
|
||
|
use crate::api::router::*;
|
||
|
use serde_json::{json, Value};
|
||
|
|
||
|
fn datastore_list(param: Value, _info: &ApiMethod) -> Result<Value, Error> {
|
||
|
println!("This is a test {}", param);
|
||
|
Ok(json!({}))
|
||
|
}
|
||
|
|
||
|
pub fn router() -> Router {
|
||
|
|
||
|
let route = Router::new()
|
||
|
.get(ApiMethod::new(
|
||
|
datastore_list,
|
||
|
ObjectSchema::new("Directory index.")));
|
||
|
|
||
|
route
|
||
|
}
|