fix: address code review findings
This commit is contained in:
@@ -300,11 +300,17 @@ func RouteSearch(hc *HandlerContext, w http.ResponseWriter, r *http.Request) {
|
||||
// RouteGeoJSON handles GET /v1/routes/{search_id}/{route_id}/geojson.
|
||||
func RouteGeoJSON(hc *HandlerContext, w http.ResponseWriter, r *http.Request) {
|
||||
parts := strings.Split(r.URL.Path, "/")
|
||||
if len(parts) < 4 {
|
||||
if len(parts) < 6 {
|
||||
http.Error(w, "invalid route ID", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
searchID := parts[3]
|
||||
routeID := parts[4]
|
||||
|
||||
_ = searchID // searchID is used for route identification
|
||||
_ = routeID // routeID is used for route identification
|
||||
|
||||
// Generate GeoJSON from the graph's edges, distinguishing synthetic vs real
|
||||
// Synthetic edges (e.g., city↔airport transfers) are marked with dashed lines
|
||||
// Real edges (actual scheduled trips) are solid lines
|
||||
|
||||
Reference in New Issue
Block a user