Add blurhash support to backend

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-06-10 09:36:25 +02:00
parent 8ef718121c
commit a24e08a6de
17 changed files with 161 additions and 44 deletions

View File

@@ -80,11 +80,12 @@ defmodule Mobilizon.Discussions do
# However, it also excludes all top-level comments with deleted replies from being selected
# |> where([_, r], is_nil(r.deleted_at))
|> group_by([c], c.id)
|> order_by([c], desc: :is_announcement, asc: :published_at)
|> select([c, r], %{c | total_replies: count(r.id)})
end
def query(Comment, _) do
order_by(Comment, [c], asc: :published_at)
order_by(Comment, [c], asc: :is_announcement, asc: :published_at)
end
def query(queryable, _) do