Commit 129e30f4 authored by lain's avatar lain
Browse files

Add basic config endpoint.

parent 1b086834
......@@ -25,6 +25,7 @@ def user_fetcher(username) do
get "/statuses/public_and_external_timeline", TwitterAPI.Controller, :public_timeline
get "/statuses/show/:id", TwitterAPI.Controller, :fetch_status
get "/statusnet/conversation/:id", TwitterAPI.Controller, :fetch_conversation
get "/statusnet/config", TwitterAPI.Controller, :config
end
scope "/api", Pleroma.Web do
......
......@@ -83,6 +83,20 @@ def upload(conn, %{"media" => media}) do
|> send_resp(200, response)
end
def config(conn, _params) do
response = %{
site: %{
name: Pleroma.Web.base_url,
server: Pleroma.Web.base_url,
textlimit: -1
}
}
|> Poison.encode!
conn
|> json_reply(200, response)
end
defp json_reply(conn, status, json) do
conn
|> put_resp_content_type("application/json")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment