allow event trip_type update
This commit is contained in:
@ -105,6 +105,7 @@ pub struct EventUpdate<'a> {
|
||||
pub notes: Option<&'a str>,
|
||||
pub always_show: bool,
|
||||
pub is_locked: bool,
|
||||
pub trip_type_id: Option<i64>,
|
||||
}
|
||||
|
||||
impl Event {
|
||||
@ -244,11 +245,12 @@ WHERE trip_details.id=?
|
||||
let was_already_cancelled = tripdetails.max_people == 0;
|
||||
|
||||
sqlx::query!(
|
||||
"UPDATE trip_details SET max_people = ?, notes = ?, always_show = ?, is_locked = ? WHERE id = ?",
|
||||
"UPDATE trip_details SET max_people = ?, notes = ?, always_show = ?, is_locked = ?, trip_type_id = ? WHERE id = ?",
|
||||
update.max_people,
|
||||
update.notes,
|
||||
update.always_show,
|
||||
update.is_locked,
|
||||
update.trip_type_id,
|
||||
self.trip_details_id
|
||||
)
|
||||
.execute(db)
|
||||
|
Reference in New Issue
Block a user