1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
7 Contains stubs for unimplemented Mastodon API endpoints.
9 Note: instead of routing directly to this controller's action,
10 it's preferable to define an action in relevant (non-generic) controller,
11 set up OAuth rules for it and call this controller's function from it.
14 use Pleroma.Web, :controller
18 plug(:skip_auth when action in [:empty_array, :empty_object])
20 action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
22 def empty_array(conn, _) do
23 Logger.debug("Unimplemented, returning an empty array (list)")
27 def empty_object(conn, _) do
28 Logger.debug("Unimplemented, returning an empty object (map)")