forked from Ruderverein-Donau-Linz/rowt
allow 'always_show' when creating events
This commit is contained in:
@ -18,6 +18,7 @@ use crate::model::{
|
||||
struct AddEventForm<'r> {
|
||||
name: &'r str,
|
||||
planned_amount_cox: i32,
|
||||
always_show: bool,
|
||||
tripdetails: TripDetailsToAdd<'r>,
|
||||
}
|
||||
|
||||
@ -34,7 +35,14 @@ async fn create(
|
||||
//just created
|
||||
//the object
|
||||
|
||||
Event::create(db, data.name, data.planned_amount_cox, &trip_details).await;
|
||||
Event::create(
|
||||
db,
|
||||
data.name,
|
||||
data.planned_amount_cox,
|
||||
data.always_show,
|
||||
&trip_details,
|
||||
)
|
||||
.await;
|
||||
|
||||
Flash::success(Redirect::to("/planned"), "Event hinzugefügt")
|
||||
}
|
||||
|
Reference in New Issue
Block a user