Implement first pass of announcement admin api

CCBUG: https://git.pleroma.social/pleroma/pleroma/-/issues/2836
CCBUG: https://git.pleroma.social/pleroma/pleroma/-/issues/1470
This commit is contained in:
Tusooa Zhu 2022-03-08 00:06:07 -05:00
commit d7af67012f
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
9 changed files with 392 additions and 0 deletions

View file

@ -229,6 +229,11 @@ defmodule Pleroma.Web.Router do
post("/frontends/install", FrontendController, :install)
post("/backups", AdminAPIController, :create_backup)
get("/announcements", AnnouncementController, :index)
post("/announcements", AnnouncementController, :create)
get("/announcements/:id", AnnouncementController, :show)
delete("/announcements/:id", AnnouncementController, :delete)
end
# AdminAPI: admins and mods (staff) can perform these actions (if enabled by config)