From 81e16f8a8d3f4b393bc9c820a17c2e9f7cba695d Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Thu, 3 Nov 2016 16:47:18 -0600 Subject: [PATCH] don't bind res.json --- routes/api/settings/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/api/settings/index.js b/routes/api/settings/index.js index cda9a3806..5cb7bcc01 100644 --- a/routes/api/settings/index.js +++ b/routes/api/settings/index.js @@ -3,11 +3,11 @@ const router = express.Router(); const Setting = require('../../../models/setting'); router.get('/', (req, res, next) => { - Setting.getSettings().then(res.json.bind(res)).catch(next); + Setting.getSettings().then(settings => res.json(settings)).catch(next); }); router.put('/', (req, res, next) => { - Setting.updateSettings(req.body).then(res.json.bind(res)).catch(next); + Setting.updateSettings(req.body).then(settings => res.json(settings)).catch(next); }); module.exports = router;