sort awards by created_at

This commit is contained in:
byte[] 2019-12-07 16:46:32 -05:00
parent 0db101fca4
commit 54c6085ddf

View file

@ -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