spc-pleroma/lib/pleroma/web/mastodon_api/controllers/mastodon_api_controller.ex

24 lines
614 B
Elixir
Raw Normal View History

# Pleroma: A lightweight social networking server
2018-12-31 15:41:47 +00:00
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
use Pleroma.Web, :controller
2017-11-19 01:22:07 +00:00
require Logger
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
2019-09-06 18:50:00 +00:00
# Stubs for unimplemented mastodon api
#
def empty_array(conn, _) do
Logger.debug("Unimplemented, returning an empty array")
json(conn, [])
end
def empty_object(conn, _) do
Logger.debug("Unimplemented, returning an empty object")
2018-08-14 02:27:28 +00:00
json(conn, %{})
end
end