diff options
| author | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-17 16:44:41 +0300 | 
|---|---|---|
| committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-17 16:44:54 +0300 | 
| commit | a76168e743c3dd193db6ebca029f287da9edd290 (patch) | |
| tree | ad437d52eead284d32a10d0b609b62a0e313c0c1 /lib | |
| parent | 015597c2abbd9a78df76903bb2c3d229bf11e958 (diff) | |
| download | pleroma-a76168e743c3dd193db6ebca029f287da9edd290.tar.gz pleroma-a76168e743c3dd193db6ebca029f287da9edd290.zip  | |
Cleanup PleromaAPIController
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/pleroma/web/pleroma_api/pleroma_api_controller.ex | 26 | 
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/pleroma/web/pleroma_api/pleroma_api_controller.ex b/lib/pleroma/web/pleroma_api/pleroma_api_controller.ex index 246b351dc..d17ccf84d 100644 --- a/lib/pleroma/web/pleroma_api/pleroma_api_controller.ex +++ b/lib/pleroma/web/pleroma_api/pleroma_api_controller.ex @@ -9,7 +9,6 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do    alias Pleroma.Conversation.Participation    alias Pleroma.Notification -  alias Pleroma.SubscriptionNotification    alias Pleroma.Web.ActivityPub.ActivityPub    alias Pleroma.Web.MastodonAPI.ConversationView    alias Pleroma.Web.MastodonAPI.NotificationView @@ -87,29 +86,4 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do        |> render("index.json", %{notifications: notifications, for: user})      end    end - -  def delete_subscription_notification(%{assigns: %{user: user}} = conn, %{ -        "id" => notification_id -      }) do -    with {:ok, notification} <- SubscriptionNotification.dismiss(user, notification_id) do -      conn -      |> put_view(NotificationView) -      |> render("show.json", %{notification: notification, for: user}) -    else -      {:error, message} -> -        conn -        |> put_status(:bad_request) -        |> json(%{"error" => message}) -    end -  end - -  def read_subscription_notification(%{assigns: %{user: user}} = conn, %{"max_id" => max_id}) do -    with notifications <- SubscriptionNotification.clear_up_to(user, max_id) do -      notifications = Enum.take(notifications, 80) - -      conn -      |> put_view(NotificationView) -      |> render("index.json", %{notifications: notifications, for: user}) -    end -  end  end  | 
