Previously, we only needed to get the last week number from the index, to
properly redirect to it.
However, we will need it in the future in other places.
Implement a function that centralizes this database operation.
Static files served with FileServer have a low priority : all other possible routes
a this root will be checked first, before they get returned.
As we have a lot of routes at the root, they will be hit a lot before we get
to the static files.
Move the static files to a dedicated path to reduce those internal redirections,
update the paths in the HTML and add one for the favicon so it continues to work.
Instead of adding all routes manually in the Launch function for Rocket,
implement fairings for all the different files that adds the routing to
the rocket in a self-contained manner.
Add a logout button that clears the auth cookies, logging out the user.
It also tries to remove the auth token from the databse, but will ignore
any error during the database operation.
Do some include clean-ups as well.
Implement a way for admins to introduce new weeks and set them as the last active one.
The last active week is the last one that is accessible to players, and will also prevent
the graph from being displayed.
Implement arrows for navigating between the weeks in the HTML.
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.
- Create a new migration adding a Weeks table, allowing for new weekly introductions
and paving the way for multiple week handling.
- Add route to update the weekly introduction
- Move the week rendering to a specific week file
- Update the templates to use the week number from the week data
- Update templates to render and edit weekly introductions
This first version allows login of pre-existing users, creation and update of truths
by admins, vote on the truths by users, their display as well as a simple graph
for the vote results.
Everything persisting in a SQLite database.