diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 501c222..c47b29b 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -626,7 +626,7 @@ export function Settings() { const showUsage = accessStore.isAuthorized(); useEffect(() => { // checks per minutes - checkUpdate(); + // checkUpdate(); showUsage && checkUsage(); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); diff --git a/app/store/access.ts b/app/store/access.ts index 6884e71..f850baa 100644 --- a/app/store/access.ts +++ b/app/store/access.ts @@ -82,7 +82,7 @@ export const useAccessStore = createPersistStore( fetch() { if (fetchState > 0 || getClientConfig()?.buildMode === "export") return; fetchState = 1; - fetch("/api/config", { + fetch("https://app.gter.net/ai/config", { method: "post", body: null, headers: { @@ -90,9 +90,10 @@ export const useAccessStore = createPersistStore( }, }) .then((res) => res.json()) - .then((res: DangerConfig) => { - console.log("[Config] got config from server", res); - set(() => ({ ...res })); + .then((res) => { + var config = res.data; + console.log("[Config] got config from server", config); + set(() => ({ ...config })); }) .catch(() => { console.error("[Config] failed to fetch config");