Stream-Übersicht aller laufenden Vetos und Matches
/stream zeigt alle aktiven Matches als Karten (Veto mit Map-Board, Match mit Live-Stand und Serie), dazu offene Lobbys und Ergebnisse. Raster passt sich der Anzahl an, ab 7 Matches wird geblättert. Live per Socket, optional mit STREAM_KEY geschützt, ohne Codes oder Verbindungsdaten.
This commit is contained in:
1 parent
ea2207899f
commit
85041b2bff
11 files changed
+495
-3
No files matched your search
@@ -69,6 +69,14 @@ export function createApiRouter({ service, manager, config, pools, adapter }) {
|
||||
|
||||
router.get('/matches', wrap(() => ({ matches: service.listMatches() })));
|
||||
|
||||
// Stream-Übersicht aller Matches; mit STREAM_KEY nur mit passendem ?key=
|
||||
router.get('/stream/overview', wrap((req) => {
|
||||
if (config.streamKey && !safeEqual(String(req.query.key ?? ''), config.streamKey)) {
|
||||
throw new HttpError(403, 'Für die Stream-Übersicht wird der Stream-Schlüssel benötigt', 'forbidden');
|
||||
}
|
||||
return service.streamOverview();
|
||||
}));
|
||||
|
||||
router.post('/matches', limit('create'), wrap((req) => {
|
||||
const { teamA, teamB, mode, format, vetoStart, password } = req.body ?? {};
|
||||
if (config.createMatchPassword && !safeEqual(password ?? '', config.createMatchPassword)) {
|
||||
|
||||
Reference in new issue
Block a user