Apply suggestion to lib/pleroma/web/pleroma_api/subscription_notification_controller.ex

This commit is contained in:
Roman Chvanikov 2019-09-17 13:42:40 +00:00
parent c0f776faec
commit f9be517c7f

View File

@ -20,9 +20,7 @@ def list(%{assigns: %{user: user}} = conn, params) 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