mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-11-03 19:07:00 -05: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) {
 | 
					  findAll(req, res) {
 | 
				
			||||||
    var expandedCollections = this.db.collections.map(c => c.toJSONExpanded(this.db.libraryItems))
 | 
					    res.json({
 | 
				
			||||||
    res.json(expandedCollections)
 | 
					      collections: this.db.collections.map(c => c.toJSONExpanded(this.db.libraryItems))
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  findOne(req, res) {
 | 
					  findOne(req, res) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user