feat: replace Bandsintown with Ticketmaster for concert events

Backend: swap /api/events/:artist to use Ticketmaster Discovery API
(startDateTime=now, classificationName=music, size=20, sort by date).
Maps TM response to the same {datetime, venue, offers} shape the modal
expects. Returns [] if TICKETMASTER_API_KEY is not set.

Frontend: remove all debug console.logs from events.js; drop redundant
client-side date filter (TM already filters by startDateTime server-side).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-06-08 20:51:51 +02:00
1 parent def625a622
commit adcbb2e883
3 files changed
+40 -18

No files matched your search

+2 -7
View File
@@ -3,19 +3,14 @@ import { S } from '../state.js';
export async function fetchEvents(artistName) {
const base = S.cfg?.backendUrl;
console.log('[events] base:', base, '| artist:', artistName);
if(!base) return [];
try {
const r = await fetch(`${base}/api/events/${encodeURIComponent(artistName)}`);
console.log('[events] status:', r.status);
if(!r.ok) return [];
const data = await r.json();
console.log('[events] data:', data);
if(!Array.isArray(data)) return [];
const filtered = data.filter(e => new Date(e.datetime) > new Date());
console.log('[events] upcoming:', filtered.length);
return filtered;
} catch(e) { console.log('[events] error:', e); return []; }
return data;
} catch { return []; }
}
export function openEventsModal(events, artistName) {