Commit a547a5c851cbb9f83c1a7264085fcf1b433731c8

Thomas de Grivel 2022-02-04T20:29:42

sort user repos

diff --git a/lib/kmxgit/repository_manager.ex b/lib/kmxgit/repository_manager.ex
index 8e010bc..1396fc0 100644
--- a/lib/kmxgit/repository_manager.ex
+++ b/lib/kmxgit/repository_manager.ex
@@ -96,15 +96,13 @@ defmodule Kmxgit.RepositoryManager do
     Repo.one from repo in Repository, select: count()
   end
 
-  def list_contributor_repositories(user, params = %IndexParams{} \\ %IndexParams{per: 1000000}) do
-    pagination = list_repositories(params)
-    result = pagination.result
+  def list_contributor_repositories(user) do
+    list_all_repositories()
     |> Enum.filter(fn repo ->
       (!repo.user || repo.user.id != user.id) &&
       (Repository.members(repo)
        |> Enum.find(fn u -> u.id == user.id end))
     end)
-    result
   end
 
   def change_repository() do