aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-09-09 19:19:13 +0200
committerRoger Braun <roger@rogerbraun.net>2017-09-09 19:19:13 +0200
commitd66d69c3b429b8ad18d4247fe6abd0ee9e1a8ece (patch)
tree6b21477faddf29cb2a3dec39a2b2bb41d0419c8e /lib
parent5fe9e4dd3feaeea9e35c3ef126e8c3b0ee8601a6 (diff)
downloadpleroma-d66d69c3b429b8ad18d4247fe6abd0ee9e1a8ece.tar.gz
Small hack to make notifications return empty for now.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex6
-rw-r--r--lib/pleroma/web/router.ex2
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 84b94b352..c81d58d64 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -7,6 +7,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.TwitterAPI.TwitterAPI
alias Pleroma.Web.CommonAPI
+ import Logger
def create_app(conn, params) do
with cs <- App.register_changeset(%App{}, params) |> IO.inspect,
@@ -101,4 +102,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
render conn, StatusView, "status.json", %{activity: activity, for: user, as: :activity}
end
end
+
+ def empty_array(conn, _) do
+ Logger.debug("Unimplemented, returning an empty array")
+ json(conn, [])
+ end
end
diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex
index 33c3aa53d..84bf6791d 100644
--- a/lib/pleroma/web/router.ex
+++ b/lib/pleroma/web/router.ex
@@ -61,6 +61,8 @@ defmodule Pleroma.Web.Router do
post "/statuses/:id/reblog", MastodonAPIController, :reblog_status
post "/statuses/:id/favourite", MastodonAPIController, :fav_status
post "/statuses/:id/unfavourite", MastodonAPIController, :unfav_status
+
+ get "/notifications", MastodonAPIController, :empty_array
end
scope "/api", Pleroma.Web do