From f527f745829b7b4f1fb7d012f563037fd29a7d87 Mon Sep 17 00:00:00 2001 From: kotva006 Date: Wed, 8 May 2024 14:10:43 -0500 Subject: [PATCH] Updated the vehicle marker channel to use new predictions repo --- lib/dotcom_web/channels/vehicle_map_marker_channel.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dotcom_web/channels/vehicle_map_marker_channel.ex b/lib/dotcom_web/channels/vehicle_map_marker_channel.ex index 5f3ba183a9..370e2f99c3 100644 --- a/lib/dotcom_web/channels/vehicle_map_marker_channel.ex +++ b/lib/dotcom_web/channels/vehicle_map_marker_channel.ex @@ -6,6 +6,8 @@ defmodule DotcomWeb.VehicleMapMarkerChannel do alias Leaflet.MapData.Marker alias Vehicles.Vehicle + @predictions_repo Application.compile_env!(:dotcom, :repo_modules)[:predictions] + intercept(["reset", "add", "update", "remove"]) @impl Phoenix.Channel @@ -46,7 +48,7 @@ defmodule DotcomWeb.VehicleMapMarkerChannel do trip = Schedules.Repo.trip(vehicle.trip_id) prediction = - Predictions.Repo.all( + @predictions_repo.all( route: vehicle.route_id, direction_id: vehicle.direction_id )