Skip to content

Commit

Permalink
information for redo of get trip info
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Jan 10, 2025
1 parent 7759765 commit ac58ae8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Empty file.
15 changes: 14 additions & 1 deletion src/birch/get_vehicle_trip_information.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ struct QueryTripInformationParams {
pub trip_id: String,
pub start_time: Option<String>,
pub start_date: Option<String>,
pub route_id: Option<String>,
}

#[actix_web::get("/get_trip_information_rt_update/{chateau}/")]
Expand Down Expand Up @@ -424,6 +425,13 @@ pub async fn get_trip_rt_update(
}
}

// TODO!
// - Allow for Swiftly Scheduleless no trip system
// - Allow for detours, looking up of new stops

//How to do it
//Use a centralised table and progressively update it

#[actix_web::get("/get_trip_information/{chateau}/")]
pub async fn get_trip_init(
path: web::Path<String>,
Expand All @@ -447,7 +455,12 @@ pub async fn get_trip_init(
return HttpResponse::InternalServerError().body("Error connecting to database");
}

let conn = &mut conn_pre.unwrap();
let conn: &mut bb8::PooledConnection<
'_,
diesel_async::pooled_connection::AsyncDieselConnectionManager<
diesel_async::AsyncPgConnection,
>,
> = &mut conn_pre.unwrap();

timer.add("open_pg_connection");

Expand Down

0 comments on commit ac58ae8

Please sign in to comment.