announcements: implement list feeds endpoint
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
14ec8472ef
commit
d19471fd4d
|
@ -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]:
|
||||
|
|
Loading…
Reference in New Issue