Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into develop

This commit is contained in:
Roger Braun 2017-04-17 11:37:21 +02:00
commit a185ea63af
3 changed files with 12 additions and 0 deletions

View file

@ -21,6 +21,8 @@ defmodule Pleroma.Web.Router do
scope "/api", Pleroma.Web do
pipe_through :api
get "/help/test", TwitterAPI.Controller, :help_test
get "/statuses/public_timeline", TwitterAPI.Controller, :public_timeline
get "/statuses/public_and_external_timeline", TwitterAPI.Controller, :public_timeline
get "/statuses/show/:id", TwitterAPI.Controller, :fetch_status

View file

@ -85,6 +85,10 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
|> send_resp(200, response)
end
def help_test(conn, _params) do
conn |> json_reply(200, Poison.encode!("ok"))
end
def upload_json(conn, %{"media" => media}) do
response = TwitterAPI.upload(media, "json")
conn