mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-22 13:53:40 +00:00
adding donation page
This commit is contained in:
15
src/main.rs
15
src/main.rs
@@ -358,12 +358,21 @@ fn emission(dashboard: &State<Arc<Mutex<Dashboard>>>) -> Template {
|
||||
}
|
||||
|
||||
|
||||
// Rendering Donate page.
|
||||
#[get("/donate")]
|
||||
fn donate() -> Template {
|
||||
Template::render("donate", context! {
|
||||
route: "donate",
|
||||
public_api: CONFIG.public_api.clone(),
|
||||
})
|
||||
}
|
||||
|
||||
// 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(),
|
||||
route: "api_overview",
|
||||
public_api: CONFIG.public_api.clone(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -948,7 +957,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, api_overview])
|
||||
emission, api_overview, donate])
|
||||
.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