mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-10 19:31:39 +00:00
Fix: libraryFolder does not exist for new library model
This commit is contained in:
parent
5b22d7430a
commit
da82e2117b
2 changed files with 2 additions and 2 deletions
|
|
@ -48,7 +48,7 @@ class MiscController {
|
|||
if (!library) {
|
||||
return res.status(404).send(`Library not found with id ${libraryId}`)
|
||||
}
|
||||
const folder = library.libraryFolders.find((fold) => fold.id === folderId)
|
||||
const folder = await Database.libraryFolderModel.findByPk(folderId)
|
||||
if (!folder) {
|
||||
return res.status(404).send(`Folder not found with id ${folderId} in library ${library.name}`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class PodcastController {
|
|||
return res.status(404).send('Library not found')
|
||||
}
|
||||
|
||||
const folder = library.libraryFolders.find((fold) => fold.id === payload.folderId)
|
||||
const folder = await Database.libraryFolderModel.findByPk(payload.folderId)
|
||||
if (!folder) {
|
||||
Logger.error(`[PodcastController] Create: Folder not found "${payload.folderId}"`)
|
||||
return res.status(404).send('Folder not found')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue