Fix/system info 404 (#1413)

* fix: system info 404

* fix: lint error
This commit is contained in:
Junyan Qin (Chin)
2025-05-13 23:14:06 +08:00
committed by GitHub
parent 2bf94539bd
commit 5abbcb62a2
2 changed files with 7 additions and 5 deletions

View File

@@ -49,12 +49,13 @@ export interface RequestConfig extends AxiosRequestConfig {
retry?: number; // 重试次数
}
export let systemInfo: ApiRespSystemInfo | null = null;
class HttpClient {
private instance: AxiosInstance;
private disableToken: boolean = false;
// 暂不需要SSR
// private ssrInstance: AxiosInstance | null = null
public systemInfo: ApiRespSystemInfo | null = null;
constructor(baseURL?: string, disableToken?: boolean) {
this.instance = axios.create({
@@ -67,9 +68,9 @@ class HttpClient {
this.disableToken = disableToken || false;
this.initInterceptors();
if (this.systemInfo === null) {
if (systemInfo === null && baseURL != 'https://space.langbot.app') {
this.getSystemInfo().then((res) => {
this.systemInfo = res;
systemInfo = res;
});
}
}
@@ -400,6 +401,7 @@ class HttpClient {
sort_order,
});
}
public installPluginFromGithub(
source: string,
): Promise<AsyncTaskCreatedResp> {