Centralize pagination settings

This commit is contained in:
Claudio Ortolina
2026-02-17 08:24:07 +00:00
parent 0c4af8340b
commit 10b6a0703c
7 changed files with 36 additions and 17 deletions
+3 -1
View File
@@ -5,8 +5,10 @@ defmodule MusicLibrary.Wishlist do
alias MusicLibrary.Records.{RecordRelease, SearchIndex}
alias MusicLibrary.Repo
@pagination Application.compile_env!(:music_library, :pagination)
def search_records(query, opts \\ []) do
limit = Keyword.get(opts, :limit, 20)
limit = Keyword.get(opts, :limit, @pagination[:default_page_size])
offset = Keyword.get(opts, :offset, 0)
order = Keyword.get(opts, :order, :alphabetical)