Skip to content

Commit

Permalink
hotfix(TransitNearMeController): fix broken location call
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed May 21, 2024
1 parent 00a9f79 commit aa9f991
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions lib/dotcom_web/controllers/transit_near_me_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ defmodule DotcomWeb.TransitNearMeController do
end

defp assign_location(conn) do
location_fn = Map.get(conn.assigns, :location_fn, &Location.get/1)

location = location_fn.(conn.params, [])

assign(conn, :location, location)
assign(conn, :location, Location.get(conn.params))
end

defp assign_stops(%{assigns: %{location: {:ok, [location | _]}}} = conn) do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
defmodule DotcomWeb.TransitNearMeControllerTest do
use DotcomWeb.ConnCase
@moduletag :external

alias LocationService.Address
alias Leaflet.{MapData, MapData.Marker}
Expand Down

0 comments on commit aa9f991

Please sign in to comment.