fix(twitch,rumble,shorts): replis serveur, embed Rumble autoritaire, refonte UX Shorts
CI / build-and-test (push) Successful in 14m15s
CI / build-and-test (push) Successful in 14m15s
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user