2018-12-23 20:04:54 +00:00
|
|
|
# Pleroma: A lightweight social networking server
|
2020-03-03 16:44:49 -06:00
|
|
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
2018-12-23 20:04:54 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2017-09-06 19:06:25 +02:00
|
|
|
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
|
|
|
use Pleroma.Web, :controller
|
2019-07-28 20:30:10 +00:00
|
|
|
|
2017-11-19 02:22:07 +01:00
|
|
|
require Logger
|
2017-09-06 19:06:25 +02:00
|
|
|
|
2019-08-26 19:16:40 +07:00
|
|
|
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
|
2018-06-03 19:28:11 +02:00
|
|
|
|
2019-09-06 21:50:00 +03:00
|
|
|
# Stubs for unimplemented mastodon api
|
|
|
|
#
|
2017-09-09 19:19:13 +02:00
|
|
|
def empty_array(conn, _) do
|
|
|
|
Logger.debug("Unimplemented, returning an empty array")
|
|
|
|
json(conn, [])
|
|
|
|
end
|
2017-11-10 15:24:39 +02:00
|
|
|
|
2018-03-09 20:56:21 +02:00
|
|
|
def empty_object(conn, _) do
|
|
|
|
Logger.debug("Unimplemented, returning an empty object")
|
2018-08-14 04:27:28 +02:00
|
|
|
json(conn, %{})
|
|
|
|
end
|
2017-09-06 19:06:25 +02:00
|
|
|
end
|