more filters

This commit is contained in:
byte[] 2019-12-05 00:02:08 -05:00
parent 98260fac9f
commit 19f9cf7db4

View file

@ -42,7 +42,8 @@ defmodule PhilomenaWeb.ProfileController do
%{term: %{hidden_from_users: false}} %{term: %{hidden_from_users: false}}
] ]
} }
} },
sort: %{posted_at: :desc}
}, },
%{page_size: 3}, %{page_size: 3},
Comment |> preload(user: [awards: :badge], image: :tags) Comment |> preload(user: [awards: :badge], image: :tags)
@ -62,10 +63,12 @@ defmodule PhilomenaWeb.ProfileController do
must: [ must: [
%{term: %{user_id: user.id}}, %{term: %{user_id: user.id}},
%{term: %{anonymous: false}}, %{term: %{anonymous: false}},
%{term: %{hidden_from_users: false}} %{term: %{hidden_from_users: false}},
%{term: %{access_level: "normal"}}
] ]
} }
} },
sort: %{created_at: :desc}
}, },
%{page_size: 6}, %{page_size: 6},
Post |> preload(user: [awards: :badge], topic: :forum) Post |> preload(user: [awards: :badge], topic: :forum)