mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-09 17:04:58 +02:00
Update:Only load collections when needed
This commit is contained in:
parent
354e16e462
commit
5a9eed0a5a
8 changed files with 87 additions and 24 deletions
|
@ -200,7 +200,7 @@ class PlaylistController {
|
|||
|
||||
// POST: api/playlists/collection/:collectionId
|
||||
async createFromCollection(req, res) {
|
||||
let collection = Database.collections.find(c => c.id === req.params.collectionId)
|
||||
let collection = await Database.models.collection.getById(req.params.collectionId)
|
||||
if (!collection) {
|
||||
return res.status(404).send('Collection not found')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue