diff --git a/src/admin/route/web.rs b/src/admin/route/web.rs index 6752f45..b2a4ba6 100644 --- a/src/admin/route/web.rs +++ b/src/admin/route/web.rs @@ -280,11 +280,11 @@ async fn delete_station( axum::extract::Path((route_id, station_id)): axum::extract::Path<(i64, i64)>, ) -> impl IntoResponse { let Some(route) = Route::find_by_id(&db, route_id).await else { - er!(session, t!("nonexisting_route", id = id)); + er!(session, t!("nonexisting_route", id = route_id)); return Redirect::to("/admin/route"); }; let Some(station) = Station::find_by_id(&db, station_id).await else { - er!(session, t!("nonexisting_station", id = station.id)); + er!(session, t!("nonexisting_station", id = station_id)); return Redirect::to(&format!("/admin/route/{route_id}")); }; @@ -317,11 +317,11 @@ async fn move_station_higher( axum::extract::Path((route_id, station_id)): axum::extract::Path<(i64, i64)>, ) -> impl IntoResponse { let Some(route) = Route::find_by_id(&db, route_id).await else { - er!(session, t!("nonexisting_route", id = id)); + er!(session, t!("nonexisting_route", id = route_id)); return Redirect::to("/admin/route"); }; let Some(station) = Station::find_by_id(&db, station_id).await else { - er!(session, t!("nonexisting_station", id = station.id)); + er!(session, t!("nonexisting_station", id = station_id)); return Redirect::to(&format!("/admin/route/{route_id}")); }; diff --git a/src/station.rs b/src/station.rs index 0766979..c1dff27 100644 --- a/src/station.rs +++ b/src/station.rs @@ -404,7 +404,7 @@ async fn remove_waiting( }; let Some(team) = Team::find_by_id(&db, team_id).await else { - er!(session, t!("nonexisting_team", id = form.team_id)); + er!(session, t!("nonexisting_team", id = team_id)); return Redirect::to("/s/{id}/{code}"); }; @@ -427,7 +427,7 @@ async fn team_starting( }; let Some(team) = Team::find_by_id(&db, team_id).await else { - er!(session, t!("nonexisting_team", id = form.team_id)); + er!(session, t!("nonexisting_team", id = team_id)); return Redirect::to("/s/{id}/{code}"); };