This commit is contained in:
philipp 2023-05-03 14:39:53 +02:00
parent 913d0ac78e
commit e5088bddb0
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,6 @@ async fn login(
) -> Flash<Redirect> {
let user = User::login(db, login.name.clone(), login.password.clone()).await;
//TODO: be able to use ? for login. This would get rid of the following match clause.
let user = match user {
Ok(user) => user,
Err(LoginError::NoPasswordSet(user)) => {

View File

@ -14,11 +14,12 @@ use crate::model::{
user::CoxUser,
};
//TODO: add constraints (e.g. planned_amount_cox > 0)
#[derive(FromForm)]
struct AddTripForm {
day: String,
//TODO: properly parse `planned_starting_time`
planned_starting_time: String,
#[field(validate = range(1..))]
max_people: i32,
notes: Option<String>,
trip_type: Option<i64>,