mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 14:17:59 +01:00
sort awards by created_at
This commit is contained in:
parent
0db101fca4
commit
54c6085ddf
1 changed files with 1 additions and 2 deletions
|
@ -2,8 +2,7 @@ defmodule PhilomenaWeb.ProfileView do
|
|||
use PhilomenaWeb, :view
|
||||
|
||||
def award_order(awards) do
|
||||
awards
|
||||
|> Enum.sort_by(&{!&1.badge.priority, &1.awarded_on})
|
||||
Enum.sort_by(awards, &{!&1.badge.priority, &1.created_at})
|
||||
end
|
||||
|
||||
def badge_image(badge, options \\ []) do
|
||||
|
|
Loading…
Reference in a new issue