Browse Source

update method simply returned true, therefore just send back the response asumming it worked

sbkwgh 8 years ago
parent
commit
dea31cd40e
1 changed files with 6 additions and 1 deletions
  1. 6 1
      routes/settings.js

+ 6 - 1
routes/settings.js

@@ -52,7 +52,11 @@ router.put('/', async (req, res) => {
 		if(validationErrors.length) throw Errors.VALIDAITON_ERROR
 
 		let updatedSettings = await Settings.set(params)
-		res.json(updatedSettings.toJSON())
+
+		res.json({
+			forumName: req.body.forumName,
+			forumDescription: req.body.forumDescription
+		})
 		
 	} catch (e) {
 		if(e === Errors.VALIDAITON_ERROR) {
@@ -61,6 +65,7 @@ router.put('/', async (req, res) => {
 				errors: [validationErrors]
 			})
 		} else {
+			console.log(e)
 			res.status(500)
 			res.json({
 				errors: [Errors.unknown]