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> {
|
) -> Flash<Redirect> {
|
||||||
let user = User::login(db, login.name.clone(), login.password.clone()).await;
|
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 {
|
let user = match user {
|
||||||
Ok(user) => user,
|
Ok(user) => user,
|
||||||
Err(LoginError::NoPasswordSet(user)) => {
|
Err(LoginError::NoPasswordSet(user)) => {
|
||||||
|
@ -14,11 +14,12 @@ use crate::model::{
|
|||||||
user::CoxUser,
|
user::CoxUser,
|
||||||
};
|
};
|
||||||
|
|
||||||
//TODO: add constraints (e.g. planned_amount_cox > 0)
|
|
||||||
#[derive(FromForm)]
|
#[derive(FromForm)]
|
||||||
struct AddTripForm {
|
struct AddTripForm {
|
||||||
day: String,
|
day: String,
|
||||||
|
//TODO: properly parse `planned_starting_time`
|
||||||
planned_starting_time: String,
|
planned_starting_time: String,
|
||||||
|
#[field(validate = range(1..))]
|
||||||
max_people: i32,
|
max_people: i32,
|
||||||
notes: Option<String>,
|
notes: Option<String>,
|
||||||
trip_type: Option<i64>,
|
trip_type: Option<i64>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user