From e1ab16a5fdd27e3dc546d01a958918d04c21fa46 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sat, 14 Sep 2024 14:24:42 +0100 Subject: [PATCH] Limit the amount of records in the list Needs to be replaced with pagination --- lib/music_library/records.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/music_library/records.ex b/lib/music_library/records.ex index 1dc5e7ca..77f423f4 100644 --- a/lib/music_library/records.ex +++ b/lib/music_library/records.ex @@ -18,7 +18,9 @@ defmodule MusicLibrary.Records do """ def list_records do - Repo.all(Record) + Record + |> limit(10) + |> Repo.all() end @doc """