Skip to content

Commit

Permalink
style: appease credo
Browse files Browse the repository at this point in the history
  • Loading branch information
KaylaBrady committed Dec 6, 2024
1 parent 6d933f8 commit d7b6e57
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions lib/mbta_v3_api/store/alerts.ex
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ defmodule MBTAV3API.Store.Alerts.Impl do
}
end

# Conver the struct to a record for ETS
# override alert 611483 behavior to temporarily address GL Park St alert boundary issue
defp to_record(
%Alert{
id: "611483"
Expand All @@ -85,16 +85,10 @@ defmodule MBTAV3API.Store.Alerts.Impl do
entities =
alert.informed_entity
|> Enum.reject(fn entity ->
entity.stop == "70196" && entity.route != "Green-B"
end)
|> Enum.reject(fn entity ->
entity.stop == "70197" && entity.route != "Green-C"
end)
|> Enum.reject(fn entity ->
entity.stop == "70198" && entity.route != "Green-D"
end)
|> Enum.reject(fn entity ->
entity.stop == "70199" && entity.route != "Green-E"
(entity.stop == "70196" && entity.route != "Green-B") ||
(entity.stop == "70197" && entity.route != "Green-C") ||
(entity.stop == "70198" && entity.route != "Green-D") ||
(entity.stop == "70199" && entity.route != "Green-E")
end)

{
Expand All @@ -103,6 +97,7 @@ defmodule MBTAV3API.Store.Alerts.Impl do
}
end

# Convert the struct to a record for ETS
defp to_record(
%Alert{
id: id
Expand Down

0 comments on commit d7b6e57

Please sign in to comment.