~ihabunek/triglav

d6a48a9ab7ac25f97415e1655c82423ed4faf8da — Ivan Habunek 10 months ago 3304141
Order unmatched stops and remove duplicates
1 files changed, 3 insertions(+), 3 deletions(-)

M lib/triglav_web/controllers/zet/stops_controller.ex
M lib/triglav_web/controllers/zet/stops_controller.ex => lib/triglav_web/controllers/zet/stops_controller.ex +3 -3
@@ 14,10 14,10 @@ defmodule TriglavWeb.Zet.StopsController do
    unmatched_platforms =
      Osmosis.list_platform_members(relation_ids)
      |> Enum.map(& &1.member)
      # TODO: move filtering to database
      # TODO: move sort/filter to database
      |> Enum.uniq()
      |> Enum.reject(&Relation.has_tag?(&1, "gtfs:stop_id"))

    IO.inspect(length(unmatched_platforms))
      |> Enum.sort_by(& &1.id)

    annotated_unmatched_platforms =
      Enum.map(unmatched_platforms, fn member ->