Extend `/api/pleroma/notifications/read` to mark multiple notifications
[akkoma] / lib / pleroma / web / router.ex
index 969dc66fd2ab70c490506ab6a6be7d393ea361b8..44a4279f7f419aa793a3dc5d8dffd3a1d958743a 100644 (file)
@@ -236,12 +236,6 @@ defmodule Pleroma.Web.Router do
       post("/blocks_import", UtilController, :blocks_import)
       post("/follow_import", UtilController, :follow_import)
     end
-
-    scope [] do
-      pipe_through(:oauth_read)
-
-      post("/notifications/read", UtilController, :notifications_read)
-    end
   end
 
   scope "/oauth", Pleroma.Web.OAuth do
@@ -277,6 +271,7 @@ defmodule Pleroma.Web.Router do
     scope [] do
       pipe_through(:oauth_write)
       patch("/conversations/:id", PleromaAPIController, :update_conversation)
+      post("/notifications/read", PleromaAPIController, :read_notification)
     end
   end