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