restructure code

This commit is contained in:
2023-04-06 08:06:50 +02:00
parent 051d20e627
commit 82c4680684
2 changed files with 42 additions and 44 deletions

View File

@ -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!")