mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-24 01:39:24 +02:00
Update Playlist model & controller to remove usage of old Playlist object, remove old Playlist
This commit is contained in:
parent
6780ef9b37
commit
9785bc02ea
7 changed files with 501 additions and 513 deletions
|
@ -35,6 +35,9 @@ class CollectionController {
|
|||
if (!reqBody.name || !reqBody.libraryId) {
|
||||
return res.status(400).send('Invalid collection data')
|
||||
}
|
||||
if (reqBody.description && typeof reqBody.description !== 'string') {
|
||||
return res.status(400).send('Invalid collection description')
|
||||
}
|
||||
const libraryItemIds = (reqBody.books || []).filter((b) => !!b && typeof b == 'string')
|
||||
if (!libraryItemIds.length) {
|
||||
return res.status(400).send('Invalid collection data. No books')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue