Add:Open RSS feed for collection #606 #1265

This commit is contained in:
advplyr 2022-12-27 18:03:31 -06:00
parent 4021b6eca1
commit 308ccf470f
5 changed files with 211 additions and 9 deletions

View file

@ -26,7 +26,16 @@ class CollectionController {
}
findOne(req, res) {
res.json(req.collection.toJSONExpanded(this.db.libraryItems))
const includeEntities = (req.query.include || '').split(',')
const collectionExpanded = req.collection.toJSONExpanded(this.db.libraryItems)
if (includeEntities.includes('rssfeed')) {
const feedData = this.rssFeedManager.findFeedForEntityId(collectionExpanded.id)
collectionExpanded.rssFeed = feedData ? feedData.toJSONMinified() : null
}
res.json(collectionExpanded)
}
async update(req, res) {