From 0aa2723063184f3b71f50511f24628953a120701 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 21 Nov 2022 07:52:33 -0600 Subject: [PATCH] Update:API status codes and update server settings response payload --- server/controllers/MiscController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/controllers/MiscController.js b/server/controllers/MiscController.js index db060b16..6e8df5a6 100644 --- a/server/controllers/MiscController.js +++ b/server/controllers/MiscController.js @@ -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() }) }