feat(serverdata): added catch if we are not on localhost we cant actaully see the devDir in set
This commit is contained in:
@@ -13,6 +13,11 @@ export function getSettings(token: string) {
|
||||
|
||||
const fetchSettings = async (token: string) => {
|
||||
const {data} = await axios.get("/api/server/settings", {headers: {Authorization: `Bearer ${token}`}});
|
||||
|
||||
return data.data;
|
||||
// if we are not localhost ignore the devDir setting.
|
||||
const url: string = window.location.host.split(":")[0];
|
||||
let settingsData = data.data;
|
||||
if (url != "localhost") {
|
||||
settingsData.filter((n: any) => n.name === "devDir");
|
||||
}
|
||||
return settingsData;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user