mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-17 23:38:19 +00:00
Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into develop
This commit is contained in:
commit
a185ea63af
|
@ -21,6 +21,8 @@ defmodule Pleroma.Web.Router do
|
||||||
|
|
||||||
scope "/api", Pleroma.Web do
|
scope "/api", Pleroma.Web do
|
||||||
pipe_through :api
|
pipe_through :api
|
||||||
|
|
||||||
|
get "/help/test", TwitterAPI.Controller, :help_test
|
||||||
get "/statuses/public_timeline", TwitterAPI.Controller, :public_timeline
|
get "/statuses/public_timeline", TwitterAPI.Controller, :public_timeline
|
||||||
get "/statuses/public_and_external_timeline", TwitterAPI.Controller, :public_timeline
|
get "/statuses/public_and_external_timeline", TwitterAPI.Controller, :public_timeline
|
||||||
get "/statuses/show/:id", TwitterAPI.Controller, :fetch_status
|
get "/statuses/show/:id", TwitterAPI.Controller, :fetch_status
|
||||||
|
|
|
@ -85,6 +85,10 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
|
||||||
|> send_resp(200, response)
|
|> send_resp(200, response)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def help_test(conn, _params) do
|
||||||
|
conn |> json_reply(200, Poison.encode!("ok"))
|
||||||
|
end
|
||||||
|
|
||||||
def upload_json(conn, %{"media" => media}) do
|
def upload_json(conn, %{"media" => media}) do
|
||||||
response = TwitterAPI.upload(media, "json")
|
response = TwitterAPI.upload(media, "json")
|
||||||
conn
|
conn
|
||||||
|
|
|
@ -157,6 +157,12 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
|
||||||
end
|
end
|
||||||
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
|
describe "POST /api/qvitter/update_avatar.json" do
|
||||||
setup [:valid_user]
|
setup [:valid_user]
|
||||||
test "without valid credentials", %{conn: conn} do
|
test "without valid credentials", %{conn: conn} do
|
||||||
|
|
Loading…
Reference in a new issue