diff --git a/src/client/api/index.js b/src/client/api/index.js index 0858b56cd..262694db6 100644 --- a/src/client/api/index.js +++ b/src/client/api/index.js @@ -336,6 +336,11 @@ api.settings.deleteRole = ({ _id, newRoleId }) => { return res.data }) } +api.settings.buildSass = () => { + return axios.get(`/api/v1/settings/buildsass`).then(res => { + return res.data + }) +} api.common = {} api.common.fetchRoles = () => { diff --git a/src/client/sagas/settings/index.js b/src/client/sagas/settings/index.js index 60c4f45fb..f13494c3b 100644 --- a/src/client/sagas/settings/index.js +++ b/src/client/sagas/settings/index.js @@ -86,6 +86,7 @@ function * updateColorScheme ({ payload }) { try { const response = yield call(api.settings.update, payload) yield put({ type: UPDATE_COLORSCHEME.SUCCESS, response }) + yield call(api.settings.buildSass) helpers.UI.showSnackbar('Setting saved successfully. Reloading...', false) setTimeout(function () { window.location.reload() diff --git a/src/helpers/viewdata/index.js b/src/helpers/viewdata/index.js index 2d5a3b7c7..9921fadd4 100644 --- a/src/helpers/viewdata/index.js +++ b/src/helpers/viewdata/index.js @@ -16,7 +16,6 @@ var async = require('async') var _ = require('lodash') var winston = require('winston') var moment = require('moment') -var permissions = require('../../permissions') var settingSchema = require('../../models/setting') var viewController = {}