mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-23 15:05:45 +00:00
Add warning against parsing/reusing MastoFE settings blob
This commit is contained in:
parent
f928267773
commit
8f6ba4b22f
|
@ -49,7 +49,7 @@ defmodule Pleroma.Web.MastoFEController do
|
||||||
|> render("manifest.json")
|
|> render("manifest.json")
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc "PUT /api/web/settings"
|
@doc "PUT /api/web/settings: Backend-obscure settings blob for MastoFE, don't parse/reuse elsewhere"
|
||||||
def put_settings(%{assigns: %{user: user}} = conn, %{"data" => settings} = _params) do
|
def put_settings(%{assigns: %{user: user}} = conn, %{"data" => settings} = _params) do
|
||||||
with {:ok, _} <- User.mastodon_settings_update(user, settings) do
|
with {:ok, _} <- User.mastodon_settings_update(user, settings) do
|
||||||
json(conn, %{})
|
json(conn, %{})
|
||||||
|
|
|
@ -467,6 +467,7 @@ defmodule Pleroma.Web.Router do
|
||||||
scope "/api/web", Pleroma.Web do
|
scope "/api/web", Pleroma.Web do
|
||||||
pipe_through(:authenticated_api)
|
pipe_through(:authenticated_api)
|
||||||
|
|
||||||
|
# Backend-obscure settings blob for MastoFE, don't parse/reuse elsewhere
|
||||||
put("/settings", MastoFEController, :put_settings)
|
put("/settings", MastoFEController, :put_settings)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue