Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
94a6590e
Verified
Commit
94a6590e
authored
Mar 26, 2020
by
minibikini
Browse files
Partially restore `/api/statusnet/config.json`
parent
1c3f3a12
Pipeline
#23956
passed with stages
in 3 minutes and 40 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/router.ex
View file @
94a6590e
...
...
@@ -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
...
...
lib/pleroma/web/twitter_api/controllers/util_controller.ex
View file @
94a6590e
...
...
@@ -88,6 +88,18 @@ def notifications_read(%{assigns: %{user: user}} = conn, %{"id" => notification_
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
,
%{})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment