Commit a185ea63 authored by lain's avatar lain
Browse files

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

parents 6bfd5219 9a8f05e9
......@@ -21,6 +21,8 @@ def user_fetcher(username) 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
......
......@@ -85,6 +85,10 @@ def upload(conn, %{"media" => media}) 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
......
......@@ -157,6 +157,12 @@ test "with credentials", %{conn: conn, user: current_user} do
end
end
describe "GET /help/test.json" do
test "returns \"ok\"", %{conn: conn} do
conn = get conn, "/api/help/test.json"
assert json_response(conn, 200) == "ok"
end
describe "POST /api/qvitter/update_avatar.json" do
setup [:valid_user]
test "without valid credentials", %{conn: conn} do
......
Supports Markdown
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