diff --git a/routes/push.js b/routes/push.js index 89c6478..41f917b 100644 --- a/routes/push.js +++ b/routes/push.js @@ -31,7 +31,7 @@ router.post('/', (req, res) => { if (client_id) { const clientRes = clients.get(client_id); if (!clientRes) { - return res.status(404).json({ error: `Client ${client_id} not found` }); + return res.status(200).json({ error: `Client ${client_id} not found` }); } clientRes.write(`data: ${JSON.stringify(payload)}\n\n`); diff --git a/routes/stream.js b/routes/stream.js index c637752..17cf9bc 100644 --- a/routes/stream.js +++ b/routes/stream.js @@ -23,6 +23,7 @@ router.get('/', (req, res) => { res.write(`data: ${JSON.stringify({ status: 'connected', clientId, + clientCount: clients.size(), time: timestamp.formatTime() })}\n\n`);