auth: Split off vote data from the user
Now that the application is going to have multiple pages, vote data makes no sense to keep with the user. The user struct will be used everywhere to check for authentication, which is not the case for previous votes. Create a new struct and function in src/vote.rs to retrieve existing votes and use them in places where user.votes was used previously. Remove vote-related code from src/auth.rs and the week number dependence that it required.
This commit is contained in:
parent
1419bb6d51
commit
1b4a934398
7 changed files with 47 additions and 35 deletions
|
@ -19,6 +19,7 @@ A list of things that could be implemented/added to the application, some of the
|
|||
- [x] Use fairings for the different elements
|
||||
- [ ] Use guards for User calls ?
|
||||
- [ ] Use SQLite Row ID for User IDs rather than regular IDs, for randomness ?
|
||||
- [x] Split user from vote data
|
||||
|
||||
# Dependencies
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue