Merge branch 'develop' into cleanup/drop-subscription-table-if-exists
[akkoma] / lib / pleroma / web / router.ex
index 72d3827a587517dcf39c0ed6ca9838a1f5a0a367..805bef16f176089eefc57d7e1b47b199bb43f2f7 100644 (file)
@@ -293,14 +293,6 @@ 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
@@ -339,16 +331,16 @@ defmodule Pleroma.Web.Router do
       post("/notifications/dismiss", NotificationController, :dismiss)
       delete("/notifications/destroy_multiple", NotificationController, :destroy_multiple)
 
-      get("/scheduled_statuses", MastodonAPIController, :scheduled_statuses)
-      get("/scheduled_statuses/:id", MastodonAPIController, :show_scheduled_status)
+      get("/scheduled_statuses", ScheduledActivityController, :index)
+      get("/scheduled_statuses/:id", ScheduledActivityController, :show)
 
       get("/lists", ListController, :index)
       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)
+      get("/filters", FilterController, :index)
 
       get("/suggestions", MastodonAPIController, :suggestions)
 
@@ -377,8 +369,8 @@ defmodule Pleroma.Web.Router do
       post("/statuses/:id/mute", StatusController, :mute_conversation)
       post("/statuses/:id/unmute", StatusController, :unmute_conversation)
 
-      put("/scheduled_statuses/:id", MastodonAPIController, :update_scheduled_status)
-      delete("/scheduled_statuses/:id", MastodonAPIController, :delete_scheduled_status)
+      put("/scheduled_statuses/:id", ScheduledActivityController, :update)
+      delete("/scheduled_statuses/:id", ScheduledActivityController, :delete)
 
       post("/polls/:id/votes", MastodonAPIController, :poll_vote)
 
@@ -392,10 +384,10 @@ defmodule Pleroma.Web.Router do
       post("/lists/:id/accounts", ListController, :add_to_list)
       delete("/lists/:id/accounts", ListController, :remove_from_list)
 
-      post("/filters", MastodonAPIController, :create_filter)
-      get("/filters/:id", MastodonAPIController, :get_filter)
-      put("/filters/:id", MastodonAPIController, :update_filter)
-      delete("/filters/:id", MastodonAPIController, :delete_filter)
+      post("/filters", FilterController, :create)
+      get("/filters/:id", FilterController, :show)
+      put("/filters/:id", FilterController, :update)
+      delete("/filters/:id", FilterController, :delete)
 
       patch("/pleroma/accounts/update_avatar", MastodonAPIController, :update_avatar)
       patch("/pleroma/accounts/update_banner", MastodonAPIController, :update_banner)
@@ -422,8 +414,8 @@ defmodule Pleroma.Web.Router do
       post("/follow_requests/:id/authorize", FollowRequestController, :authorize)
       post("/follow_requests/:id/reject", FollowRequestController, :reject)
 
-      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)