From: dtluna Date: Mon, 10 Apr 2017 12:54:53 +0000 (+0300) Subject: Add help/test resource X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=9383c0aada01ac1b4898aab02798ea3f9a9ea5a5;p=akkoma Add help/test resource --- 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")