reverse badge sorting order

This commit is contained in:
Luna D 2020-03-13 10:17:43 +01:00
parent 7ddd8b8ec4
commit 1983a736f3

View file

@ -2,7 +2,7 @@ defmodule PhilomenaWeb.ProfileView do
use PhilomenaWeb, :view
def award_order(awards) do
Enum.sort_by(awards, &{!&1.badge.priority, DateTime.to_unix(&1.awarded_on)})
Enum.sort_by(awards, &{&1.badge.priority, DateTime.to_unix(&1.awarded_on)}, &>=/2)
end
def badge_image(badge, options \\ []) do