only allow guests to register for specific events; don't even show them the other trips

This commit is contained in:
2023-04-29 18:57:01 +02:00
parent 5b06eaeebc
commit bb4dba7bc9
12 changed files with 96 additions and 29 deletions

View File

@ -34,6 +34,7 @@ async fn create(
data.max_people,
data.day.clone(),
data.notes.clone(),
data.allow_guests,
data.trip_type,
)
.await;
@ -43,14 +44,7 @@ async fn create(
//the object
//TODO: fix clone()
PlannedEvent::create(
db,
data.name.clone(),
data.planned_amount_cox,
data.allow_guests,
trip_details,
)
.await;
PlannedEvent::create(db, data.name.clone(), data.planned_amount_cox, trip_details).await;
Flash::success(Redirect::to("/"), "Successfully planned the event")
}