mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-22 00:07:52 +01:00
Update CollectionController.js to respond with objects
Changes: - `findAll` (GET /api/collections)
This commit is contained in:
parent
0851050392
commit
b8f74e1c98
@ -20,8 +20,9 @@ class CollectionController {
|
||||
}
|
||||
|
||||
findAll(req, res) {
|
||||
var expandedCollections = this.db.collections.map(c => c.toJSONExpanded(this.db.libraryItems))
|
||||
res.json(expandedCollections)
|
||||
res.json({
|
||||
collections: this.db.collections.map(c => c.toJSONExpanded(this.db.libraryItems))
|
||||
})
|
||||
}
|
||||
|
||||
findOne(req, res) {
|
||||
|
Loading…
Reference in New Issue
Block a user