diff options
Diffstat (limited to 'lib/pleroma/web/twitter_api/twitter_api_controller.ex')
-rw-r--r-- | lib/pleroma/web/twitter_api/twitter_api_controller.ex | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex new file mode 100644 index 000000000..836013cff --- /dev/null +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@ -0,0 +1,18 @@ +defmodule Pleroma.Web.TwitterAPI.Controller do + use Pleroma.Web, :controller + + alias Pleroma.Web.TwitterAPI.Representers.UserRepresenter + + def verify_credentials(%{assigns: %{user: user}} = conn, _params) do + response = user |> UserRepresenter.to_json + + conn + |> json_reply(200, response) + end + + defp json_reply(conn, status, json) do + conn + |> put_resp_content_type("application/json") + |> send_resp(status, json) + end +end |