diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-10-02 14:13:52 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-10-02 14:13:52 +0700 |
commit | c8b01f6667a9b5b158103de449a7769c9274bcc3 (patch) | |
tree | 6a60b90151329b2a3b7ac288b847358b11ebad5f /lib/pleroma/web/mastodon_api/controllers/instance_controller.ex | |
parent | 89ab673d00b4dd96fd29f35d7c355b777b9ec0c7 (diff) | |
download | pleroma-c8b01f6667a9b5b158103de449a7769c9274bcc3.tar.gz |
Extract instance actions from `MastodonAPIController` to `InstanceController`
Diffstat (limited to 'lib/pleroma/web/mastodon_api/controllers/instance_controller.ex')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/instance_controller.ex | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/instance_controller.ex b/lib/pleroma/web/mastodon_api/controllers/instance_controller.ex new file mode 100644 index 000000000..a55f60fec --- /dev/null +++ b/lib/pleroma/web/mastodon_api/controllers/instance_controller.ex @@ -0,0 +1,17 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/> +# SPDX-License-Identifier: AGPL-3.0-only + +defmodule Pleroma.Web.MastodonAPI.InstanceController do + use Pleroma.Web, :controller + + @doc "GET /api/v1/instance" + def show(conn, _params) do + render(conn, "show.json") + end + + @doc "GET /api/v1/instance/peers" + def peers(conn, _params) do + json(conn, Pleroma.Stats.get_peers()) + end +end |