clean code; if logged out: save url where user tried to go to, go there once logged in, Fixes #179
This commit is contained in:
@ -2,7 +2,6 @@ use std::ops::{Deref, DerefMut};
|
||||
|
||||
use argon2::{password_hash::SaltString, Argon2, PasswordHasher};
|
||||
use chrono::{Datelike, Local, NaiveDate};
|
||||
use chrono_tz::Etc::UTC;
|
||||
use log::info;
|
||||
use rocket::{
|
||||
async_trait,
|
||||
@ -101,12 +100,12 @@ pub enum LoginError {
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub(crate) struct Fee {
|
||||
pub(crate) sum_in_cents: i32,
|
||||
pub(crate) parts: Vec<(String, i32)>,
|
||||
pub(crate) name: String,
|
||||
pub(crate) user_ids: String,
|
||||
pub(crate) paid: bool,
|
||||
pub struct Fee {
|
||||
pub sum_in_cents: i32,
|
||||
pub parts: Vec<(String, i32)>,
|
||||
pub name: String,
|
||||
pub user_ids: String,
|
||||
pub paid: bool,
|
||||
}
|
||||
|
||||
impl Fee {
|
||||
@ -156,7 +155,6 @@ impl User {
|
||||
let mut fee = Fee::new();
|
||||
|
||||
if let Some(family) = Family::find_by_opt_id(db, self.family_id).await {
|
||||
let mut names = String::new();
|
||||
for member in family.members(db).await {
|
||||
fee.add_person(&member);
|
||||
if member.has_role(db, "paid").await {
|
||||
|
Reference in New Issue
Block a user