fix(twitch,rumble,shorts): replis serveur, embed Rumble autoritaire, refonte UX Shorts
CI / build-and-test (push) Successful in 14m15s

This commit is contained in:
2026-09-29 10:39:03 -04:00
parent 3fe05b3c30
commit f76a3795c2
6 changed files with 530 additions and 90 deletions
+13
View File
@@ -3014,6 +3014,19 @@ app.get('/api/twitch-token', async (_req, res) => {
}
});
// Top streams Twitch via le token serveur (repli fiable pour Home/Explore
// quand les appels Helix directs du navigateur échouent).
app.get('/api/twitch/top-streams', async (req, res) => {
try {
const first = Math.min(50, Math.max(1, parseInt(String(req.query.first || '24'), 10) || 24));
const { default: twitch } = await import('./providers/twitch.mjs');
const items = await twitch.topStreams(first);
return res.json({ items });
} catch (e) {
return res.status(502).json({ items: [], error: e?.message || 'twitch_top_streams_failed' });
}
});
// -------------------- Gemini summarize (server-side) --------------------
// Keeps GEMINI_API_KEY on the server. Client calls POST /api/ai/summarize.
app.get('/api/ai/status', (_req, res) => {