Apply suggestion to lib/pleroma/web/pleroma_api/subscription_notification_controller.ex
authorRoman Chvanikov <chvanikoff@pm.me>
Tue, 17 Sep 2019 13:42:40 +0000 (13:42 +0000)
committerRoman Chvanikov <chvanikoff@pm.me>
Tue, 17 Sep 2019 13:42:40 +0000 (13:42 +0000)
lib/pleroma/web/pleroma_api/subscription_notification_controller.ex

index fff307b4e7ed64fca4c72c6d62bf37e1438039ea..969ce01792fe12b93b50def704e5636fffcdd832 100644 (file)
@@ -20,9 +20,7 @@ defmodule Pleroma.Web.PleromaAPI.SubscriptionNotificationController do
 
   def get(%{assigns: %{user: user}} = conn, %{"id" => id} = _params) do
     with {:ok, notification} <- SubscriptionNotification.get(user, id) do
-      conn
-      |> put_view(SubscriptionNotificationView)
-      |> render("show.json", %{subscription_notification: notification, for: user})
+      render(conn, "show.json", %{subscription_notification: notification, for: user})
     else
       {:error, reason} ->
         conn