Merge pull request #897 from bluewave-labs/fix/settings

removed console logs, removed permission check for getting settings
This commit is contained in:
Alexander Holliday
2024-09-30 00:21:17 -07:00
committed by GitHub
3 changed files with 4 additions and 3 deletions

View File

@ -47,7 +47,6 @@ const AdvancedSettings = ({ isAdmin }) => {
const getSettings = async () => {
const action = await dispatch(getAppSettings({ authToken }));
if (action.payload.success) {
console.log(action.payload.data);
setLocalSettings(action.payload.data);
} else {
createToast({ body: "Failed to get settings" });

View File

@ -10,7 +10,9 @@ class NetworkService {
this.setBaseUrl(baseURL);
this.unsubscribe = store.subscribe(() => {
const state = store.getState();
baseURL = state.settings.apiBaseUrl || BASE_URL;
if (state.settings.apiBaseUrl) {
baseURL = state.settings.apiBaseUrl;
}
this.setBaseUrl(baseURL);
});
this.axiosInstance.interceptors.response.use(

View File

@ -3,7 +3,7 @@ const settingsController = require("../controllers/settingsController");
const { isAllowed } = require("../middleware/isAllowed");
const Monitor = require("../models/Monitor");
router.get("/", isAllowed(["superadmin"]), settingsController.getAppSettings);
router.get("/", settingsController.getAppSettings);
router.put(
"/",
isAllowed(["superadmin"]),