diff options
author | kaniini <ariadne@dereferenced.org> | 2019-10-02 10:46:14 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-10-02 10:46:14 +0000 |
commit | 433f2c0f6854d2838819e08f0fb0a9e8cf058021 (patch) | |
tree | d098664dc27ca996f5797ac5b7fcddc282fe4869 /lib/pleroma/web/mastodon_api/controllers/instance_controller.ex | |
parent | debd0a306697f629dd8a9c2e4bf3a9b5f87db77e (diff) | |
parent | c8b01f6667a9b5b158103de449a7769c9274bcc3 (diff) | |
download | pleroma-433f2c0f6854d2838819e08f0fb0a9e8cf058021.tar.gz |
Merge branch 'split-masto-api/instance' into 'develop'
Extract instance actions from `MastodonAPIController` to `InstanceController`
See merge request pleroma/pleroma!1760
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 |