Add group admin profiles

And other fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-08-27 11:53:24 +02:00
parent 8afda73214
commit 1984f71cbf
107 changed files with 3514 additions and 1146 deletions

View File

@@ -46,13 +46,6 @@ defmodule Mobilizon.Posts do
|> Page.build_page(page, limit)
end
def do_get_posts_for_group(group_id) do
Post
|> where(attributed_to_id: ^group_id)
|> order_by(desc: :inserted_at)
|> preload([p], [:author, :attributed_to, :picture])
end
@doc """
Get a post by it's ID
"""
@@ -144,4 +137,11 @@ defmodule Mobilizon.Posts do
defp filter_public(query) do
where(query, [p], p.visibility == ^:public and not p.draft)
end
defp do_get_posts_for_group(group_id) do
Post
|> where(attributed_to_id: ^group_id)
|> order_by(desc: :inserted_at)
|> preload([p], [:author, :attributed_to, :picture])
end
end