refactor reloadSettings

This commit is contained in:
Alex Holliday
2024-09-30 09:52:47 +08:00
parent f4bbbc5fa9
commit 114f4ffb05
2 changed files with 11 additions and 18 deletions
+2 -2
View File
@@ -31,11 +31,11 @@ const updateAppSettings = async (req, res, next) => {
try {
const settings = await req.db.updateAppSettings(req.body);
await req.settingsService.reloadSettings();
const updatedSettings = await req.settingsService.reloadSettings();
return res.status(200).json({
success: true,
msg: successMessages.UPDATE_APP_SETTINGS,
data: settings,
data: updatedSettings,
});
} catch (error) {
error.service === undefined ? (error.service = SERVICE_NAME) : null;