diff --git a/README.md b/README.md index ac48cb6..2b6d940 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A list of things that could be implemented/added to the application, some of the - [x] Being able to change from one week to the next - [x] Create new weeks for the admin - - [ ] Proper week redirection + - [x] Proper week redirection - [ ] Correctly handle non-existing week number - [x] Add introduction to the weekly truths - [ ] Bundle static assets in the binary diff --git a/src/auth.rs b/src/auth.rs index 1fd62fa..7f6b251 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -9,7 +9,7 @@ use argon2::{Argon2, PasswordHash, PasswordVerifier}; use blake2::{Blake2b512, Digest}; use blake2::digest::FixedOutput; use crate::database_records::{AuthTokens, PlayerLoginInfo, Vote}; -use crate::database; +use crate::{database, week}; use database::Db; // TODO: Make FromRequest guard https://api.rocket.rs/v0.5/rocket/request/trait.FromRequest and split admin @@ -126,8 +126,8 @@ pub struct AuthForm { password: String } -#[post("/login", data="