aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordtluna <dtluna@openmailbox.org>2017-04-10 15:54:53 +0300
committerdtluna <dtluna@openmailbox.org>2017-04-10 15:54:53 +0300
commit9383c0aada01ac1b4898aab02798ea3f9a9ea5a5 (patch)
tree582493987829b51e3339500c3a9f715d73337598
parent0016589aea391fd6b8d41257b7f39f76b5b93775 (diff)
downloadpleroma-9383c0aada01ac1b4898aab02798ea3f9a9ea5a5.tar.gz
Add help/test resource
-rw-r--r--lib/pleroma/web/router.ex1
-rw-r--r--lib/pleroma/web/twitter_api/twitter_api_controller.ex4
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex
index 52030d684..e52a95657 100644
--- a/lib/pleroma/web/router.ex
+++ b/lib/pleroma/web/router.ex
@@ -21,6 +21,7 @@ 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
diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex
index f2c893e96..8163897e7 100644
--- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex
+++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex
@@ -83,6 +83,10 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
|> send_resp(200, response)
end
+ def help_test(conn, _) do
+ conn |> json_reply(200, Poison.encode!("ok"))
+ end
+
defp json_reply(conn, status, json) do
conn
|> put_resp_content_type("application/json")