From 7fc4aca8e117356340530a995e04ce5dc7f5b1f7 Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Wed, 7 Nov 2018 01:45:02 -0500 Subject: [PATCH] chore(code): cleanup --- src/controllers/api/v1/settings.js | 14 +++++++------- src/sass/partials/materialize.scss | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controllers/api/v1/settings.js b/src/controllers/api/v1/settings.js index d0ea49646..01055850e 100644 --- a/src/controllers/api/v1/settings.js +++ b/src/controllers/api/v1/settings.js @@ -21,6 +21,11 @@ var async = require('async'), var apiSettings = {}; +function defaultApiResponse(err, res) { + if (err) return res.status(400).json({success: false, error: err}); + + return res.json({success: true}); +} /** * @api {put} /api/v1/settings/:setting Update Setting @@ -80,10 +85,7 @@ apiSettings.updateSetting = function(req, res) { }); }); }, function(err) { - //done - if (err) return res.status(400).json({success: false, error: err}); - - return res.json({success: true}); + return defaultApiResponse(err, res); }); }; @@ -102,9 +104,7 @@ apiSettings.testMailer = function(req, res) { apiSettings.buildsass = function(req, res) { var buildsass = require('../../../sass/buildsass'); buildsass.build(function(err) { - if (err) return res.status(400).json({success: false, error: err}); - - return res.json({success: true}); + return defaultApiResponse(err, res); }); }; diff --git a/src/sass/partials/materialize.scss b/src/sass/partials/materialize.scss index cb1b0b512..e809dc1cc 100644 --- a/src/sass/partials/materialize.scss +++ b/src/sass/partials/materialize.scss @@ -91,7 +91,7 @@ $medium-only: "only screen and (min-width : #{$small-screen-up}) and (max-width height: 15px; background-color: darken($page_content_bg, 5%); border-radius: 15px; - margin-right: 10px; + //margin-right: 10px; transition: background 0.3s ease; vertical-align: middle; margin: 0 16px;