mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
Add missing deleted filter on featured lookup (fixes philomena-dev/philomena#124)
This commit is contained in:
parent
ac6dde20ef
commit
38c134668a
2 changed files with 2 additions and 0 deletions
|
@ -73,6 +73,7 @@ defmodule PhilomenaWeb.ActivityController do
|
||||||
featured_image =
|
featured_image =
|
||||||
Image
|
Image
|
||||||
|> join(:inner, [i], f in ImageFeature, on: [image_id: i.id])
|
|> join(:inner, [i], f in ImageFeature, on: [image_id: i.id])
|
||||||
|
|> where([i], i.hidden_from_users == false)
|
||||||
|> filter_hidden(user, conn.params["hidden"])
|
|> filter_hidden(user, conn.params["hidden"])
|
||||||
|> order_by([i, f], desc: f.created_at)
|
|> order_by([i, f], desc: f.created_at)
|
||||||
|> limit(1)
|
|> limit(1)
|
||||||
|
|
|
@ -13,6 +13,7 @@ defmodule PhilomenaWeb.Api.Json.Image.FeaturedController do
|
||||||
featured_image =
|
featured_image =
|
||||||
Image
|
Image
|
||||||
|> join(:inner, [i], f in ImageFeature, on: [image_id: i.id])
|
|> join(:inner, [i], f in ImageFeature, on: [image_id: i.id])
|
||||||
|
|> where([i], i.hidden_from_users == false)
|
||||||
|> order_by([_i, f], desc: f.created_at)
|
|> order_by([_i, f], desc: f.created_at)
|
||||||
|> limit(1)
|
|> limit(1)
|
||||||
|> preload([:user, :intensity, tags: :aliases])
|
|> preload([:user, :intensity, tags: :aliases])
|
||||||
|
|
Loading…
Reference in a new issue