Skip to content

Commit

Permalink
Change default profile listing order
Browse files Browse the repository at this point in the history
Order by :updated_at
  • Loading branch information
lurnid committed Dec 12, 2024
1 parent af4d2c9 commit 1d4a7e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/maker_passport/maker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ defmodule MakerPassport.Maker do
from q in query, preload: ^preload
end)
|> Repo.all()
|> Repo.preload([:user])
|> Repo.preload([:user, :skills])
end

@doc """
Expand Down
2 changes: 1 addition & 1 deletion lib/maker_passport_web/live/profile_live/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule MakerPassportWeb.ProfileLive.Index do
profiles =
case socket.assigns.current_user do
nil ->
Maker.list_profiles()
Maker.list_profiles_by_criteria([{:sort, %{sort_by: :updated_at, sort_order: :desc}}])

user ->
Maker.list_profiles()
Expand Down

0 comments on commit 1d4a7e1

Please sign in to comment.