diff --git a/lib/dotcom_web/controllers/schedule/finder_api.ex b/lib/dotcom_web/controllers/schedule/finder_api.ex index bd62f7da48..679a3ccf72 100644 --- a/lib/dotcom_web/controllers/schedule/finder_api.ex +++ b/lib/dotcom_web/controllers/schedule/finder_api.ex @@ -20,6 +20,7 @@ defmodule DotcomWeb.ScheduleController.FinderApi do require Logger @route_patterns_repo Application.compile_env!(:dotcom, :repo_modules)[:route_patterns] + @predictions_repo Application.compile_env!(:dotcom, :repo_modules)[:predictions] @type react_keys :: :date | :direction | :is_current @type react_strings :: [{react_keys, String.t()}] @@ -217,7 +218,8 @@ defmodule DotcomWeb.ScheduleController.FinderApi do direction_id: direction_id ] - predictions_fn = Map.get(conn.assigns, :predictions_fn, &Predictions.Repo.all/1) + predictions_fn = + Map.get(conn.assigns, :predictions_fn, Function.capture(@predictions_repo, :all, 1)) predictions = if current_service?,