From 9330d30240c5e9cdc4f26fd598ef790143982eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 2 Sep 2024 00:29:18 +0200 Subject: [PATCH] Don't use the Soapbox scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- lib/pleroma/web/router.ex | 64 --------------------------------------- 1 file changed, 64 deletions(-) diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index dcee30c9db..821a41050a 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -718,70 +718,6 @@ defmodule Pleroma.Web.Router do end end - scope "/api/v1/soapbox/admin", Pleroma.Web.AdminAPI do - # AdminAPI: only admins can perform these actions - scope [] do - pipe_through([:admin_api, :require_admin]) - - get("/rules", RuleController, :index) - post("/rules", RuleController, :create) - patch("/rules/:id", RuleController, :update) - delete("/rules/:id", RuleController, :delete) - - get("/webhooks", WebhookController, :index) - get("/webhooks/:id", WebhookController, :show) - post("/webhooks", WebhookController, :create) - patch("/webhooks/:id", WebhookController, :update) - delete("/webhooks/:id", WebhookController, :delete) - post("/webhooks/:id/enable", WebhookController, :enable) - post("/webhooks/:id/disable", WebhookController, :disable) - post("/webhooks/:id/rotate_secret", WebhookController, :rotate_secret) - end - - # AdminAPI: admins and mods (staff) can perform these actions (if privileged by role) - scope [] do - pipe_through(:require_privileged_role_reports_manage_reports) - - post("/reports/assign_account", ReportController, :assign_account) - end - end - - scope "/api/v1/soapbox", Pleroma.Web.PleromaAPI do - scope [] do - pipe_through(:authenticated_api) - - post("/events", EventController, :create) - get("/events/joined_events", EventController, :joined_events) - put("/events/:id", EventController, :update) - get("/events/:id/participations", EventController, :participations) - get("/events/:id/participation_requests", EventController, :participation_requests) - - post( - "/events/:id/participation_requests/:participant_id/authorize", - EventController, - :authorize_participation_request - ) - - post( - "/events/:id/participation_requests/:participant_id/reject", - EventController, - :reject_participation_request - ) - - post("/events/:id/join", EventController, :join) - post("/events/:id/leave", EventController, :leave) - get("/events/:id/ics", EventController, :export_ics) - - get("/search/location", SearchController, :location) - end - - scope [] do - pipe_through(:api) - - get("/statuses/:id/quotes", StatusController, :quotes) - end - end - scope "/api/v1", Pleroma.Web.MastodonAPI do pipe_through(:authenticated_api)