no message
This commit is contained in:
parent
9bae199f05
commit
4b95f23867
@ -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
|
||||
}, []);
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user