restructure code
This commit is contained in:
@ -65,8 +65,6 @@ async fn join(db: &State<SqlitePool>, trip_details_id: i64, user: User) -> Flash
|
||||
|
||||
#[get("/remove/<trip_details_id>")]
|
||||
async fn remove(db: &State<SqlitePool>, trip_details_id: i64, user: User) -> Flash<Redirect> {
|
||||
//TODO: Check if > 2 hrs to event
|
||||
|
||||
UserTrip::delete(db, user.id, trip_details_id).await;
|
||||
|
||||
Flash::success(Redirect::to("/"), "Erfolgreich abgemeldet!")
|
||||
|
Reference in New Issue
Block a user