Skip to content

Commit 6754f40

Browse files
committed
drop Settings.get_featured_transactions
1 parent 7d171dd commit 6754f40

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/algora/payments/payments.ex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -865,17 +865,17 @@ defmodule Algora.Payments do
865865
}
866866
)
867867

868+
# case Algora.Settings.get_featured_transactions() do
869+
# ids when is_list(ids) and ids != [] ->
870+
# where(tx_query, [tx], tx.id in ^ids)
871+
# _ ->
868872
tx_query =
869-
case Algora.Settings.get_featured_transactions() do
870-
ids when is_list(ids) and ids != [] ->
871-
where(tx_query, [tx], tx.id in ^ids)
873+
tx_query
874+
|> where([tx], tx.succeeded_at > ago(2, "week"))
875+
|> order_by([tx], desc: tx.net_amount)
876+
|> limit(10)
872877

873-
_ ->
874-
tx_query
875-
|> where([tx], tx.succeeded_at > ago(2, "week"))
876-
|> order_by([tx], desc: tx.net_amount)
877-
|> limit(10)
878-
end
878+
# end
879879

880880
transactions =
881881
tx_query

lib/algora/settings/settings.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ defmodule Algora.Settings do
207207

208208
def get_featured_transactions do
209209
case get("featured_transactions") do
210-
%{"ids" => ids} when is_list(ids) -> nil
210+
%{"ids" => ids} when is_list(ids) -> ids
211211
_ -> nil
212212
end
213213
end

0 commit comments

Comments
 (0)