diff --git a/moonraker/components/announcements.py b/moonraker/components/announcements.py index a1a819e..4bd4730 100644 --- a/moonraker/components/announcements.py +++ b/moonraker/components/announcements.py @@ -73,6 +73,10 @@ class Announcements: "/server/announcements/feed", ["POST", "DELETE"], self._handle_feed_request ) + self.server.register_endpoint( + "/server/announcements/feeds", ["GET"], + self._handle_list_feeds + ) self.server.register_notification( "announcements:dismissed", "announcement_dismissed" ) @@ -164,6 +168,11 @@ class Announcements: "modified": changed } + async def _handle_list_feeds( + self, web_request: WebRequest + ) -> Dict[str, Any]: + return {"feeds": list(self.subscriptions.keys())} + async def _handle_feed_request( self, web_request: WebRequest ) -> Dict[str, Any]: