Remote Timeline: add Streaming support
[akkoma] / lib / pleroma / web / pleroma_api / controllers / notification_controller.ex
index 0b2f678c50212b46bdffb7711ae73cf5df47f3a9..3ed8bd294027eba8c708fdce17c41f461c147308 100644 (file)
@@ -14,7 +14,7 @@ defmodule Pleroma.Web.PleromaAPI.NotificationController do
 
   defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.PleromaNotificationOperation
 
-  def mark_as_read(%{assigns: %{user: user}} = conn, %{id: notification_id}) do
+  def mark_as_read(%{assigns: %{user: user}, body_params: %{id: notification_id}} = conn, _) do
     with {:ok, notification} <- Notification.read_one(user, notification_id) do
       render(conn, "show.json", notification: notification, for: user)
     else
@@ -25,7 +25,7 @@ defmodule Pleroma.Web.PleromaAPI.NotificationController do
     end
   end
 
-  def mark_as_read(%{assigns: %{user: user}} = conn, %{max_id: max_id}) do
+  def mark_as_read(%{assigns: %{user: user}, body_params: %{max_id: max_id}} = conn, _) do
     notifications =
       user
       |> Notification.set_read_up_to(max_id)