Fix missed commit

This commit is contained in:
Alex Holliday committed 2024-10-02 08:46:33 +08:00
1 parent d11fc90a1d
commit 8fcafc0694
1 file changed
+1 -4
+1 -4
View File
@@ -1,5 +1,4 @@
import axios from "axios";
const DEFAULT_API_URL = "http://localhost:5000/api/v1";
const BASE_URL = import.meta.env.VITE_APP_API_BASE_URL;
import { logger } from "./Logger";
class NetworkService {
@@ -10,10 +9,8 @@ class NetworkService {
this.setBaseUrl(baseURL);
this.unsubscribe = store.subscribe(() => {
const state = store.getState();
if (BASE_URL === "undefined" && state.settings.apiBaseUrl) {
if (BASE_URL === undefined && state.settings.apiBaseUrl) {
baseURL = state.settings.apiBaseUrl;
} else {
baseURL = DEFAULT_URL;
}
this.setBaseUrl(baseURL);
});