Add commit to page

This commit is contained in:
nora 2023-09-03 11:11:49 +02:00
parent ef0de0124a
commit 1f89aae3de
4 changed files with 115 additions and 75 deletions

View file

@ -51,7 +51,7 @@ async fn render_root(db: Arc<Pool<Sqlite>>) -> Result<String> {
let status = compute_status(checks);
let html = RootTemplate { status }
let html = RootTemplate { status, version: crate::VERSION }
.render()
.wrap_err("error rendering template")?;
Ok(html)
@ -212,4 +212,5 @@ struct WebsiteStatus {
#[template(path = "index.html")]
struct RootTemplate {
status: Vec<WebsiteStatus>,
version: &'static str,
}