..
This commit is contained in:
@@ -5,9 +5,10 @@ const API_Base_URL = '/api/markers';
|
||||
|
||||
export const apiService = {
|
||||
getHotspots: async (): Promise<WiFiHotspot[]> => {
|
||||
console.log(`[API Call] GET ${API_Base_URL}`);
|
||||
const fullUrl = `${window.location.origin}${API_Base_URL}`;
|
||||
console.log(`[API Call] GET ${fullUrl} (Origin: ${window.location.origin})`);
|
||||
try {
|
||||
const response = await fetch(API_Base_URL);
|
||||
const response = await fetch(API_Base_URL, { cache: 'no-store' }); // 캐시 방지 추가
|
||||
if (!response.ok) throw new Error('Failed to fetch markers');
|
||||
const data = await response.json();
|
||||
console.log(`[API Response] Received ${data.length} hotspots`, data);
|
||||
|
||||
Reference in New Issue
Block a user