optimize query
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 6m2s
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 6m2s
This commit is contained in:
parent
0593f14408
commit
775d6c2899
2 changed files with 7 additions and 5 deletions
|
|
@ -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
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue