From 881a919134e1cf274e781ced0d9aa535c56ad230 Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Sat, 26 Feb 2022 13:54:57 -0500 Subject: [PATCH] fix(appearance): color scheme updates in production build #469 --- src/client/api/index.js | 5 +++++ src/client/sagas/settings/index.js | 1 + src/helpers/viewdata/index.js | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) 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 = {}