mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Order masto searches by date.
This commit is contained in:
parent
d7654f4b3c
commit
1dd2c8163f
1 changed files with 34 additions and 30 deletions
|
@ -515,7 +515,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
a.data,
|
a.data,
|
||||||
^query
|
^query
|
||||||
),
|
),
|
||||||
limit: 20
|
limit: 20,
|
||||||
|
order_by: [desc: :inserted_at]
|
||||||
)
|
)
|
||||||
|
|
||||||
statuses = Repo.all(q) ++ fetched
|
statuses = Repo.all(q) ++ fetched
|
||||||
|
@ -605,7 +606,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
"video\/mp4"
|
"video\/mp4"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
settings: Map.get(user.info, "settings") || %{
|
settings:
|
||||||
|
Map.get(user.info, "settings") ||
|
||||||
|
%{
|
||||||
onboarded: true,
|
onboarded: true,
|
||||||
home: %{
|
home: %{
|
||||||
shows: %{
|
shows: %{
|
||||||
|
@ -656,7 +659,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
{:ok, _user} <- User.update_and_set_cache(change) do
|
{:ok, _user} <- User.update_and_set_cache(change) do
|
||||||
conn
|
conn
|
||||||
|> json(%{})
|
|> json(%{})
|
||||||
else e ->
|
else
|
||||||
|
e ->
|
||||||
conn
|
conn
|
||||||
|> json(%{error: inspect(e)})
|
|> json(%{error: inspect(e)})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue