Fix: Endpoint /api/sessions ahora devuelve todas las sesiones
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 25s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 25s
- Cambia de getActiveSessions() a getSessionHistory() sin filtro - Devuelve activas, stale y finalizadas (últimas 200) - Los stats ya contaban todas, ahora los items también
This commit is contained in:
@@ -372,9 +372,10 @@ router.post('/guests/disable-yesterday', async (_req, res) => {
|
|||||||
// ==================== SESSION ENDPOINTS ====================
|
// ==================== SESSION ENDPOINTS ====================
|
||||||
|
|
||||||
// GET /api/sessions - Active sessions
|
// GET /api/sessions - Active sessions
|
||||||
router.get('/sessions', async (_req, res) => {
|
router.get('/sessions', async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const sessions = await getActiveSessions();
|
// Por defecto devuelve todas las sesiones recientes (últimas 24h o las últimas 200)
|
||||||
|
const sessions = await getSessionHistory({ limit: 200 });
|
||||||
const stats = await getSessionStats();
|
const stats = await getSessionStats();
|
||||||
res.json({ items: sessions, count: sessions.length, stats });
|
res.json({ items: sessions, count: sessions.length, stats });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user