Restrict mastodon api announcements to logged-in users only

This commit is contained in:
Tusooa Zhu 2022-04-02 02:25:13 -04:00
commit 7d1dae3bef
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
4 changed files with 38 additions and 21 deletions

View file

@ -582,6 +582,7 @@ defmodule Pleroma.Web.Router do
get("/timelines/direct", TimelineController, :direct)
get("/timelines/list/:list_id", TimelineController, :list)
get("/announcements", AnnouncementController, :index)
post("/announcements/:id/dismiss", AnnouncementController, :mark_read)
end
@ -627,8 +628,6 @@ defmodule Pleroma.Web.Router do
get("/polls/:id", PollController, :show)
get("/directory", DirectoryController, :index)
get("/announcements", AnnouncementController, :index)
end
scope "/api/v2", Pleroma.Web.MastodonAPI do