fix build
All checks were successful
CI/CD Pipeline / test (push) Successful in 18m4s
CI/CD Pipeline / deploy (push) Successful in 7m47s

This commit is contained in:
Philipp Hofer 2025-04-24 15:51:01 +02:00
parent 5ef862c040
commit b6d161be1e
2 changed files with 6 additions and 6 deletions

View File

@ -280,11 +280,11 @@ async fn delete_station(
axum::extract::Path((route_id, station_id)): axum::extract::Path<(i64, i64)>, axum::extract::Path((route_id, station_id)): axum::extract::Path<(i64, i64)>,
) -> impl IntoResponse { ) -> impl IntoResponse {
let Some(route) = Route::find_by_id(&db, route_id).await else { 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"); return Redirect::to("/admin/route");
}; };
let Some(station) = Station::find_by_id(&db, station_id).await else { 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}")); 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)>, axum::extract::Path((route_id, station_id)): axum::extract::Path<(i64, i64)>,
) -> impl IntoResponse { ) -> impl IntoResponse {
let Some(route) = Route::find_by_id(&db, route_id).await else { 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"); return Redirect::to("/admin/route");
}; };
let Some(station) = Station::find_by_id(&db, station_id).await else { 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}")); return Redirect::to(&format!("/admin/route/{route_id}"));
}; };

View File

@ -404,7 +404,7 @@ async fn remove_waiting(
}; };
let Some(team) = Team::find_by_id(&db, team_id).await else { 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}"); 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 { 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}"); return Redirect::to("/s/{id}/{code}");
}; };