no message

This commit is contained in:
蒋小陌 2024-05-11 11:59:51 +08:00
parent 9bae199f05
commit 4b95f23867
2 changed files with 6 additions and 5 deletions

View File

@ -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
}, []);

View File

@ -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");