Skip to content

Commit

Permalink
mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrocp committed Feb 6, 2024
1 parent 2ff7a7b commit 9641353
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/beacon/content.ex
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,11 @@ defmodule Beacon.Content do
defp query_list_pages_limit(query, :infinity = _limit), do: query
defp query_list_pages_limit(query, _per_page), do: from(q in query, limit: 20)

defp query_list_pages_offset(query, per_page, page) when is_integer(per_page) and is_integer(page) do
defp query_list_pages_offset(query, per_page, page) when is_integer(per_page) and is_integer(page) do
offset = page * per_page - per_page
from(q in query, offset: ^offset)
end

defp query_list_pages_offset(query, _per_page, _page), do: from(q in query, offset: 0)

defp query_list_pages_search(query, search) when is_binary(search) do
Expand Down

0 comments on commit 9641353

Please sign in to comment.