mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-30 20:10:32 +00:00
Partially restore /api/statusnet/config.json
This commit is contained in:
parent
1c3f3a12ed
commit
94a6590e3c
2 changed files with 15 additions and 0 deletions
|
@ -482,6 +482,9 @@ defmodule Pleroma.Web.Router do
|
|||
pipe_through(:config)
|
||||
|
||||
get("/pleroma/frontend_configurations", TwitterAPI.UtilController, :frontend_configurations)
|
||||
|
||||
# Deprecated
|
||||
get("/statusnet/config", TwitterAPI.UtilController, :config)
|
||||
end
|
||||
|
||||
scope "/api", Pleroma.Web do
|
||||
|
|
|
@ -88,6 +88,18 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
|
|||
end
|
||||
end
|
||||
|
||||
# Deprecated in favor of `/nodeinfo`
|
||||
# https://git.pleroma.social/pleroma/pleroma/-/merge_requests/2327
|
||||
# https://git.pleroma.social/pleroma/pleroma-fe/-/merge_requests/1084
|
||||
def config(conn, _params) do
|
||||
json(conn, %{
|
||||
site: %{
|
||||
textlimit: to_string(Config.get([:instance, :limit])),
|
||||
vapidPublicKey: Keyword.get(Pleroma.Web.Push.vapid_config(), :public_key)
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
def frontend_configurations(conn, _params) do
|
||||
config =
|
||||
Pleroma.Config.get(:frontend_configurations, %{})
|
||||
|
|
Loading…
Reference in a new issue