vote: Change graph display condition, don't fetch for admin

Now, the graph will only show when everyone has voted and the week is no longer
the last one active.
This is to minimize information gathering by looking during voting.

Don't fetch the vote data for the admin : it is not used, so no need to
query the database.

Update README with new TODOs and clean up main includes a bit.
This commit is contained in:
trotFunky 2024-07-26 00:45:53 +01:00
parent f41f5142c9
commit 635716c04b
4 changed files with 15 additions and 5 deletions

View file

@ -12,6 +12,8 @@ use rocket_db_pools::{sqlx, sqlx::Row, Database, Connection};
use sqlx::Error;
mod auth;
use auth::User;
mod truth;
mod vote;
mod week;
@ -19,9 +21,8 @@ mod week;
mod database;
mod database_records;
use database::Db;
use database_records::*;
use auth::User;
use database::Db;
#[get("/")]
async fn index(mut db: Connection<Db>) -> Redirect {