clean up + update dfile
All checks were successful
Create and publish a Docker image / build-and-push-image (push) Successful in 6m0s

This commit is contained in:
Nicholas Orlowsky 2025-09-21 19:53:11 -04:00
parent 7904c80642
commit 8fd41b1090
No known key found for this signature in database
GPG key ID: A9F3BA4C0AA7A70B
8 changed files with 314 additions and 335 deletions

View file

@ -2,8 +2,7 @@ use std::collections::HashMap;
use libseptastic::{direction::CardinalDirection, route::RouteType};
use serde::{Deserialize, Serialize};
use sqlx::{Postgres, Transaction};
use crate::services::trip_tracking::TripTracking;
use libseptastic::{stop_schedule::{Trip, TripTracking, StopSchedule}};
pub async fn get_route_by_id(
id: String,
@ -104,29 +103,6 @@ pub async fn get_direction_by_route_id(
return Ok(res);
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct StopSchedule {
pub route_id: String,
pub stop_name: String,
pub trip_id: String,
pub service_id: String,
pub direction_id: i64,
pub arrival_time: i64,
pub stop_id: i64,
pub stop_sequence: i64
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Trip {
pub route_id: String,
pub trip_id: String,
pub direction_id: i64,
pub tracking_data: TripTracking,
pub schedule: Vec<StopSchedule>
}
pub async fn get_schedule_by_route_id(
id: String,
transaction: &mut Transaction<'_, Postgres>,