Update main
This commit is contained in:
1 file changed
+11
-3
+11
-3
@@ -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,7 +135,9 @@ async fn login_post(
|
||||
Ok((jar, Redirect::to("/manage")))
|
||||
} else {
|
||||
Err(Html(
|
||||
LoginTemplate { error: Some("Wrong password.".to_string()) }
|
||||
LoginTemplate {
|
||||
error: Some("Wrong password.".to_string()),
|
||||
}
|
||||
.render()
|
||||
.unwrap(),
|
||||
))
|
||||
|
||||
Reference in new issue
Block a user