Update Copyrights
[akkoma] / lib / pleroma / web / mastodon_api / controllers / mastodon_api_controller.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
6 use Pleroma.Web, :controller
7
8 require Logger
9
10 action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
11
12 # Stubs for unimplemented mastodon api
13 #
14 def empty_array(conn, _) do
15 Logger.debug("Unimplemented, returning an empty array")
16 json(conn, [])
17 end
18
19 def empty_object(conn, _) do
20 Logger.debug("Unimplemented, returning an empty object")
21 json(conn, %{})
22 end
23 end