feat: enhance configuration management, add update checks, and improve UI components
This commit is contained in:
@@ -14,6 +14,14 @@ const api = axios.create({
|
||||
timeout: 10000, // 10 seconds timeout
|
||||
});
|
||||
|
||||
// Export function to update base URL
|
||||
export const setApiBaseUrl = (url: string) => {
|
||||
if (url) {
|
||||
api.defaults.baseURL = url;
|
||||
console.log(`[API] Base URL updated to: ${url}`);
|
||||
}
|
||||
};
|
||||
|
||||
// Interceptor: Adds the token to EVERY request if it exists
|
||||
api.interceptors.request.use(
|
||||
async (config) => {
|
||||
|
||||
Reference in New Issue
Block a user