Fix:Show only collections for selected library #1130

This commit is contained in:
advplyr 2022-11-11 17:28:05 -06:00
parent 4cbc8676c6
commit 6f901defd6
3 changed files with 18 additions and 40 deletions

View file

@ -18,8 +18,7 @@ class CollectionController {
}
findAll(req, res) {
var collections = this.db.collections.filter(c => c.userId === req.user.id)
var expandedCollections = collections.map(c => c.toJSONExpanded(this.db.libraryItems))
var expandedCollections = this.db.collections.map(c => c.toJSONExpanded(this.db.libraryItems))
res.json(expandedCollections)
}