Fix jwt-token
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import APP_CONFIG from '../config/app';
|
||||
|
||||
// Determine API base URL based on environment
|
||||
const getApiBaseUrl = () => {
|
||||
@@ -12,8 +13,8 @@ const getApiBaseUrl = () => {
|
||||
return 'http://localhost:3002/api';
|
||||
}
|
||||
|
||||
// Otherwise, use relative URL (same domain)
|
||||
return '/drones/api';
|
||||
// Otherwise, use the configured base path + /api
|
||||
return `${APP_CONFIG.basePath}/api`;
|
||||
};
|
||||
|
||||
const API_BASE_URL = getApiBaseUrl();
|
||||
|
||||
Reference in New Issue
Block a user