mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-22 13:53:40 +00:00
adding api overview page
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -358,6 +358,16 @@ fn emission(dashboard: &State<Arc<Mutex<Dashboard>>>) -> Template {
|
||||
}
|
||||
|
||||
|
||||
// Rendering API Overview page.
|
||||
#[get("/api_overview")]
|
||||
fn api_overview() -> Template {
|
||||
Template::render("api_overview", context! {
|
||||
route: "api_overview",
|
||||
public_api: CONFIG.public_api.clone(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// Owner API.
|
||||
// Whitelisted methods: get_connected_peers, get_peers, get_status.
|
||||
#[post("/v2/owner", data="<data>")]
|
||||
@@ -938,7 +948,7 @@ async fn main() {
|
||||
soft_supply, production_cost, reward_ratio, breakeven_cost,
|
||||
last_block_age, block_list_by_height, block_list_index, search, kernel,
|
||||
output, api_owner, api_foreign, stats, unspent_outputs, kernels,
|
||||
emission])
|
||||
emission, api_overview])
|
||||
.mount("/static", FileServer::from("static"))
|
||||
.attach(Template::custom(|engines| {engines.tera.register_filter("separate_with_commas", separate_with_commas)}))
|
||||
.launch()
|
||||
|
Reference in New Issue
Block a user