From 44dc3790535262da4ce196de5ad32bd17f6d7070 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 20 Feb 2018 15:25:43 +0200 Subject: [PATCH] refactor(config) object properties shorthands --- server/config.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/server/config.js b/server/config.js index 19ea4f5d..a6f69bb0 100644 --- a/server/config.js +++ b/server/config.js @@ -152,27 +152,29 @@ function middle(req, res, next) { } } -function get(req, res) { +function get(request, response) { const data = jonny.stringify(config); ponse.send(data, { name : 'config.json', - request : req, - response: res, + request, + response, cache : false }); } -function patch(req, res) { +function patch(request, response) { const jsonStore = fullstore(); + const name = 'config.json'; + const cache = false; const options = { - name : 'config.json', - request : req, - response: res, - cache : false + name, + request, + response, + cache, }; - pullout(req, 'string') + pullout(request, 'string') .then(jonny.parse) .then(jsonStore) .then(manageConfig)