Extract domain blocks actions from `MastodonAPIController` to `DomainBlockController`
[akkoma] / lib / pleroma / web / router.ex
index 7a20b6d75de983c80577bbd50348da74d464d1b8..d370f30db2550a5455de0b3267328c146b0da4d7 100644 (file)
@@ -293,6 +293,14 @@ defmodule Pleroma.Web.Router do
       pipe_through(:oauth_read)
       get("/conversations/:id/statuses", PleromaAPIController, :conversation_statuses)
       get("/conversations/:id", PleromaAPIController, :conversation)
+
+      scope "/subscription_notifications" do
+        post("/clear", SubscriptionNotificationController, :clear)
+        post("/dismiss", SubscriptionNotificationController, :dismiss)
+        delete("/destroy_multiple", SubscriptionNotificationController, :destroy_multiple)
+        get("/", SubscriptionNotificationController, :index)
+        get("/:id", SubscriptionNotificationController, :show)
+      end
     end
 
     scope [] do
@@ -338,7 +346,7 @@ defmodule Pleroma.Web.Router do
       get("/lists/:id", ListController, :show)
       get("/lists/:id/accounts", ListController, :list_accounts)
 
-      get("/domain_blocks", MastodonAPIController, :domain_blocks)
+      get("/domain_blocks", DomainBlockController, :index)
 
       get("/filters", MastodonAPIController, :get_filters)
 
@@ -414,8 +422,8 @@ defmodule Pleroma.Web.Router do
       post("/follow_requests/:id/authorize", MastodonAPIController, :authorize_follow_request)
       post("/follow_requests/:id/reject", MastodonAPIController, :reject_follow_request)
 
-      post("/domain_blocks", MastodonAPIController, :block_domain)
-      delete("/domain_blocks", MastodonAPIController, :unblock_domain)
+      post("/domain_blocks", DomainBlockController, :create)
+      delete("/domain_blocks", DomainBlockController, :delete)
 
       post("/pleroma/accounts/:id/subscribe", MastodonAPIController, :subscribe)
       post("/pleroma/accounts/:id/unsubscribe", MastodonAPIController, :unsubscribe)