allow updating pinning an planned_trip
This commit is contained in:
@ -62,6 +62,7 @@ struct UpdatePlannedEventForm<'r> {
|
||||
planned_amount_cox: i32,
|
||||
max_people: i32,
|
||||
notes: Option<&'r str>,
|
||||
always_show: bool,
|
||||
}
|
||||
|
||||
#[put("/planned-event", data = "<data>")]
|
||||
@ -73,7 +74,13 @@ async fn update(
|
||||
match PlannedEvent::find_by_id(db, data.id).await {
|
||||
Some(planned_event) => {
|
||||
planned_event
|
||||
.update(db, data.planned_amount_cox, data.max_people, data.notes)
|
||||
.update(
|
||||
db,
|
||||
data.planned_amount_cox,
|
||||
data.max_people,
|
||||
data.notes,
|
||||
data.always_show,
|
||||
)
|
||||
.await;
|
||||
Flash::success(Redirect::to("/"), "Successfully edited the event")
|
||||
}
|
||||
|
Reference in New Issue
Block a user