Order masto searches by date.

This commit is contained in:
lain 2018-04-10 18:38:52 +02:00
parent d7654f4b3c
commit 1dd2c8163f
1 changed files with 34 additions and 30 deletions

View File

@ -515,7 +515,8 @@ def search(%{assigns: %{user: user}} = conn, %{"q" => query} = params) do
a.data,
^query
),
limit: 20
limit: 20,
order_by: [desc: :inserted_at]
)
statuses = Repo.all(q) ++ fetched
@ -605,7 +606,9 @@ def index(%{assigns: %{user: user}} = conn, _params) do
"video\/mp4"
]
},
settings: Map.get(user.info, "settings") || %{
settings:
Map.get(user.info, "settings") ||
%{
onboarded: true,
home: %{
shows: %{
@ -656,7 +659,8 @@ def put_settings(%{assigns: %{user: user}} = conn, %{"data" => settings} = _para
{:ok, _user} <- User.update_and_set_cache(change) do
conn
|> json(%{})
else e ->
else
e ->
conn
|> json(%{error: inspect(e)})
end