display bans in sorted order (fixes philomena-dev/philomena#66)

This commit is contained in:
byte[] 2020-11-15 21:00:05 -05:00
parent e058a212e7
commit 37adb661fb
4 changed files with 4 additions and 1 deletions

View file

@ -19,6 +19,7 @@ defmodule PhilomenaWeb.FingerprintProfileController do
fp_bans =
Fingerprint
|> where(fingerprint: ^fingerprint)
|> order_by(desc: :created_at)
|> Repo.all()
render(conn, "show.html",

View file

@ -21,6 +21,7 @@ defmodule PhilomenaWeb.IpProfileController do
subnet_bans =
Subnet
|> where([s], fragment("? >>= ?", s.specification, ^ip))
|> order_by(desc: :created_at)
|> Repo.all()
render(conn, "show.html",

View file

@ -157,6 +157,7 @@ defmodule PhilomenaWeb.ProfileController do
bans =
Bans.User
|> where(user_id: ^user.id)
|> order_by(desc: :created_at)
|> Repo.all()
render(