optimize query
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 6m2s

This commit is contained in:
Nicholas Orlowsky 2025-09-24 18:55:06 -04:00
parent 0593f14408
commit 775d6c2899
No known key found for this signature in database
GPG key ID: A9F3BA4C0AA7A70B
2 changed files with 7 additions and 5 deletions

View file

@ -54,14 +54,14 @@ async fn get_route_info(route_id: String, state: Data<Arc<AppState>>) -> ::anyho
let mut tx = state.database.begin().await?;
let route = database::get_route_by_id(route_id.clone(), &mut tx).await?;
//let directions = database::get_direction_by_route_id(route_id.clone(), &mut tx).await?;
let directions = database::get_direction_by_route_id(route_id.clone(), &mut tx).await?;
let mut trips = database::get_schedule_by_route_id(route_id.clone(), &mut tx).await?;
state.trip_tracking_service.annotate_trips(&mut trips);
Ok(RouteResponse{
route,
directions: Vec::new(),
directions,
schedule: trips
})
}