Update main

This commit is contained in:
structix committed 2026-09-21 21:31:16 +02:00
1 parent b84b0c4138
commit 32f1f74bd9
1 file changed
+13 -5
+13 -5
View File
@@ -2,10 +2,10 @@ mod db;
use askama::Template;
use axum::{
Router,
extract::{Form, FromRef, State},
response::{Html, Redirect},
routing::{get, post},
Router,
};
use axum_extra::extract::cookie::{Cookie, Key, PrivateCookieJar};
use rusqlite::Connection;
@@ -103,7 +103,13 @@ async fn index(State(state): State<AppState>) -> Html<String> {
})
.collect();
ExerciseStats { name, month, year, all_time, daily }
ExerciseStats {
name,
month,
year,
all_time,
daily,
}
})
.collect();
@@ -129,9 +135,11 @@ async fn login_post(
Ok((jar, Redirect::to("/manage")))
} else {
Err(Html(
LoginTemplate { error: Some("Wrong password.".to_string()) }
.render()
.unwrap(),
LoginTemplate {
error: Some("Wrong password.".to_string()),
}
.render()
.unwrap(),
))
}
}