Small hack to make notifications return empty for now.

This commit is contained in:
Roger Braun 2017-09-09 19:19:13 +02:00
parent 5fe9e4dd3f
commit d66d69c3b4
2 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
alias Pleroma.Web.ActivityPub.ActivityPub alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.TwitterAPI.TwitterAPI alias Pleroma.Web.TwitterAPI.TwitterAPI
alias Pleroma.Web.CommonAPI alias Pleroma.Web.CommonAPI
import Logger
def create_app(conn, params) do def create_app(conn, params) do
with cs <- App.register_changeset(%App{}, params) |> IO.inspect, 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} render conn, StatusView, "status.json", %{activity: activity, for: user, as: :activity}
end end
end end
def empty_array(conn, _) do
Logger.debug("Unimplemented, returning an empty array")
json(conn, [])
end
end end

View File

@ -61,6 +61,8 @@ defmodule Pleroma.Web.Router do
post "/statuses/:id/reblog", MastodonAPIController, :reblog_status post "/statuses/:id/reblog", MastodonAPIController, :reblog_status
post "/statuses/:id/favourite", MastodonAPIController, :fav_status post "/statuses/:id/favourite", MastodonAPIController, :fav_status
post "/statuses/:id/unfavourite", MastodonAPIController, :unfav_status post "/statuses/:id/unfavourite", MastodonAPIController, :unfav_status
get "/notifications", MastodonAPIController, :empty_array
end end
scope "/api", Pleroma.Web do scope "/api", Pleroma.Web do