diff --git a/server/controllers/CollectionController.js b/server/controllers/CollectionController.js index 9234abee..a00ae867 100644 --- a/server/controllers/CollectionController.js +++ b/server/controllers/CollectionController.js @@ -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) {