mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-19 16:10:59 +00:00
use media proxy for suggestions api
This commit is contained in:
parent
49b165ddc6
commit
6cbfb5ab5d
1 changed files with 7 additions and 0 deletions
|
@ -7,6 +7,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
alias Pleroma.Web.ActivityPub.Utils
|
alias Pleroma.Web.ActivityPub.Utils
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
alias Pleroma.Web.OAuth.{Authorization, Token, App}
|
alias Pleroma.Web.OAuth.{Authorization, Token, App}
|
||||||
|
alias Pleroma.Web.MediaProxy
|
||||||
alias Comeonin.Pbkdf2
|
alias Comeonin.Pbkdf2
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
require Logger
|
require Logger
|
||||||
|
@ -1125,6 +1126,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
|
|> Enum.map(fn x ->
|
||||||
|
Map.put(x, "avatar", MediaProxy.url(x["avatar"]))
|
||||||
|
end)
|
||||||
|
|> Enum.map(fn x ->
|
||||||
|
Map.put(x, "avatar_static", MediaProxy.url(x["avatar_static"]))
|
||||||
|
end)
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> json(data2)
|
|> json(data2)
|
||||||
|
|
Loading…
Reference in a new issue