From 9383c0aada01ac1b4898aab02798ea3f9a9ea5a5 Mon Sep 17 00:00:00 2001 From: dtluna Date: Mon, 10 Apr 2017 15:54:53 +0300 Subject: [PATCH] Add help/test resource --- lib/pleroma/web/router.ex | 1 + lib/pleroma/web/twitter_api/twitter_api_controller.ex | 4 ++++ 2 files changed, 5 insertions(+) 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") -- 2.45.2