From 19f9cf7db40b4152a2f41e5f0b1e5fc14684cf0d Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 5 Dec 2019 00:02:08 -0500 Subject: [PATCH] more filters --- lib/philomena_web/controllers/profile_controller.ex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/philomena_web/controllers/profile_controller.ex b/lib/philomena_web/controllers/profile_controller.ex index d1e14a4e..82fd97d4 100644 --- a/lib/philomena_web/controllers/profile_controller.ex +++ b/lib/philomena_web/controllers/profile_controller.ex @@ -42,7 +42,8 @@ defmodule PhilomenaWeb.ProfileController do %{term: %{hidden_from_users: false}} ] } - } + }, + sort: %{posted_at: :desc} }, %{page_size: 3}, Comment |> preload(user: [awards: :badge], image: :tags) @@ -62,10 +63,12 @@ defmodule PhilomenaWeb.ProfileController do must: [ %{term: %{user_id: user.id}}, %{term: %{anonymous: false}}, - %{term: %{hidden_from_users: false}} + %{term: %{hidden_from_users: false}}, + %{term: %{access_level: "normal"}} ] } - } + }, + sort: %{created_at: :desc} }, %{page_size: 6}, Post |> preload(user: [awards: :badge], topic: :forum)