fix build
This commit is contained in:
parent
5ef862c040
commit
b6d161be1e
@ -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}"));
|
||||
};
|
||||
|
||||
|
@ -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}");
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user