Skip to content

Commit

Permalink
hotfix(TripPlanController): better fallback clause
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed Sep 11, 2024
1 parent 13f933e commit 26dec61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dotcom_web/controllers/trip_plan_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ defmodule DotcomWeb.TripPlanController do
{:ok, [geocoded_from | _]} ->
do_from(conn, NamedPosition.new(geocoded_from))

{:error, _} ->
_ ->
# redirect to the initial index page
redirect(conn, to: trip_plan_path(conn, :index))
end
Expand Down Expand Up @@ -123,7 +123,7 @@ defmodule DotcomWeb.TripPlanController do
{:ok, [geocoded_to | _]} ->
do_to(conn, NamedPosition.new(geocoded_to))

{:error, _} ->
_ ->
# redirect to the initial index page
redirect(conn, to: trip_plan_path(conn, :index))
end
Expand Down

0 comments on commit 26dec61

Please sign in to comment.