Don't use the Soapbox scope

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-09-02 00:29:18 +02:00
parent acdda8d4df
commit 9330d30240

View file

@ -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)