mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-10 01:15:06 +02:00
Update:API status codes and update server settings response payload
This commit is contained in:
parent
7df8795d52
commit
0aa2723063
1 changed files with 3 additions and 3 deletions
|
@ -26,11 +26,11 @@ class MiscController {
|
|||
|
||||
var library = this.db.libraries.find(lib => lib.id === libraryId)
|
||||
if (!library) {
|
||||
return res.status(500).send(`Library not found with id ${libraryId}`)
|
||||
return res.status(404).send(`Library not found with id ${libraryId}`)
|
||||
}
|
||||
var folder = library.folders.find(fold => fold.id === folderId)
|
||||
if (!folder) {
|
||||
return res.status(500).send(`Folder not found with id ${folderId} in library ${library.name}`)
|
||||
return res.status(404).send(`Folder not found with id ${folderId} in library ${library.name}`)
|
||||
}
|
||||
|
||||
if (!files.length || !title) {
|
||||
|
@ -111,7 +111,7 @@ class MiscController {
|
|||
}
|
||||
return res.json({
|
||||
success: true,
|
||||
serverSettings: this.db.serverSettings
|
||||
serverSettings: this.db.serverSettings.toJSONForBrowser()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue