Skip to content

Commit

Permalink
Add limit 20 to get_link_stats
Browse files Browse the repository at this point in the history
  • Loading branch information
wmnnd committed Jul 3, 2024
1 parent d38ec23 commit b3bbf43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/keila/tracking/tracking.ex
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ defmodule Keila.Tracking do
|> group_by([l, c], l.url)
|> order_by([l, c], desc: count(c.id), asc: l.url)
|> select([l, c], [l.url, count(c.id)])
|> limit(20)
|> Repo.all()
|> Enum.map(&List.to_tuple/1)
end
Expand Down

0 comments on commit b3bbf43

Please sign in to comment.