feat(serverdata): added catch if we are not on localhost we cant actaully see the devDir in set

This commit is contained in:
2025-03-15 15:24:11 -05:00
parent ab16059387
commit f3fa617aa5
2 changed files with 8 additions and 2 deletions

View File

@@ -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;
};