forked from Ruderverein-Donau-Linz/rowt
Push
This commit is contained in:
parent
913d0ac78e
commit
e5088bddb0
@ -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)) => {
|
||||
|
@ -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>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user