sort tag changes by id instead of creation date (derpibooru/philomena#200)

This commit is contained in:
byte[] 2020-09-18 10:07:46 -04:00
parent f5229654e7
commit 0f69ae6fcf
9 changed files with 9 additions and 9 deletions

View file

@ -11,7 +11,7 @@ defmodule PhilomenaWeb.FingerprintProfile.SourceChangeController do
source_changes =
SourceChange
|> where(fingerprint: ^fingerprint)
|> order_by(desc: :created_at)
|> order_by(desc: :id)
|> preload([:user, image: [:user, :tags]])
|> Repo.paginate(conn.assigns.scrivener)

View file

@ -13,7 +13,7 @@ defmodule PhilomenaWeb.FingerprintProfile.TagChangeController do
|> where(fingerprint: ^fingerprint)
|> added_filter(params)
|> preload([:tag, :user, image: [:user, :tags]])
|> order_by(desc: :created_at)
|> order_by(desc: :id)
|> Repo.paginate(conn.assigns.scrivener)
render(conn, "index.html",

View file

@ -16,7 +16,7 @@ defmodule PhilomenaWeb.Image.SourceChangeController do
SourceChange
|> where(image_id: ^image.id)
|> preload([:user, image: [:user, :tags]])
|> order_by(desc: :created_at)
|> order_by(desc: :id)
|> Repo.paginate(conn.assigns.scrivener)
render(conn, "index.html",

View file

@ -17,7 +17,7 @@ defmodule PhilomenaWeb.Image.TagChangeController do
|> where(image_id: ^image.id)
|> added_filter(params)
|> preload([:tag, :user, image: [:user, :tags]])
|> order_by(desc: :created_at)
|> order_by(desc: :id)
|> Repo.paginate(conn.assigns.scrivener)
render(conn, "index.html",

View file

@ -13,7 +13,7 @@ defmodule PhilomenaWeb.IpProfile.SourceChangeController do
source_changes =
SourceChange
|> where(ip: ^ip)
|> order_by(desc: :created_at)
|> order_by(desc: :id)
|> preload([:user, image: [:user, :tags]])
|> Repo.paginate(conn.assigns.scrivener)

View file

@ -15,7 +15,7 @@ defmodule PhilomenaWeb.IpProfile.TagChangeController do
|> where(ip: ^ip)
|> added_filter(params)
|> preload([:tag, :user, image: [:user, :tags]])
|> order_by(desc: :created_at)
|> order_by(desc: :id)
|> Repo.paginate(conn.assigns.scrivener)
render(conn, "index.html",

View file

@ -26,7 +26,7 @@ defmodule PhilomenaWeb.Profile.SourceChangeController do
sc.user_id == ^user.id and not (i.user_id == ^user.id and i.anonymous == true)
)
|> preload([:user, image: [:user, :tags]])
|> order_by(desc: :created_at)
|> order_by(desc: :id)
|> Repo.paginate(conn.assigns.scrivener)
render(conn, "index.html",

View file

@ -22,7 +22,7 @@ defmodule PhilomenaWeb.Profile.TagChangeController do
)
|> added_filter(params)
|> preload([:tag, :user, image: [:user, :tags]])
|> order_by(desc: :created_at)
|> order_by(desc: :id)
|> Repo.paginate(conn.assigns.scrivener)
render(conn, "index.html",

View file

@ -17,7 +17,7 @@ defmodule PhilomenaWeb.Tag.TagChangeController do
|> where(tag_id: ^tag.id)
|> added_filter(params)
|> preload([:tag, :user, image: [:user, :tags]])
|> order_by(desc: :created_at)
|> order_by(desc: :id)
|> Repo.paginate(conn.assigns.scrivener)
render(conn, "index.html",