refactor(client): unify web and desktop release workflow
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
import axios from "axios";
|
||||
import type { AxiosResponse } from "axios";
|
||||
import { resolveApiBaseUrl } from "../runtime/apiBaseUrl";
|
||||
import { DESKTOP_SERVER_URL_CHANGED_EVENT } from "../runtime/desktopServerConfig";
|
||||
import { clientRuntime, DESKTOP_SERVER_URL_CHANGED_EVENT } from "../runtime";
|
||||
|
||||
const authClient = axios.create({
|
||||
baseURL: resolveApiBaseUrl(),
|
||||
baseURL: clientRuntime.apiBaseUrl(),
|
||||
timeout: 15000,
|
||||
});
|
||||
|
||||
export const refreshAuthClientBaseUrl = (): void => {
|
||||
authClient.defaults.baseURL = resolveApiBaseUrl();
|
||||
authClient.defaults.baseURL = clientRuntime.apiBaseUrl();
|
||||
};
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
|
||||
Reference in New Issue
Block a user