Refine player layout and station data
This commit is contained in:
10
src/radio/loadManagedStations.ts
Normal file
10
src/radio/loadManagedStations.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export async function loadManagedStations(): Promise<unknown[]> {
|
||||
const response = await fetch('/stations.json');
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to load managed stations: ${response.status}`);
|
||||
}
|
||||
|
||||
const stations = await response.json();
|
||||
return Array.isArray(stations) ? stations : [];
|
||||
}
|
||||
Reference in New Issue
Block a user