feat: implement consistent 20-color mapping for visible products across dashboard charts
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m30s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m30s
This commit is contained in:
@@ -61,6 +61,25 @@ const verifyToken = (req, res, next) => {
|
||||
});
|
||||
};
|
||||
|
||||
const sseClients = new Set();
|
||||
|
||||
// SSE Endpoint for real-time updates
|
||||
app.get('/api/stream', (req, res) => {
|
||||
res.setHeader('Content-Type', 'text/event-stream');
|
||||
res.setHeader('Cache-Control', 'no-cache');
|
||||
res.setHeader('Connection', 'keep-alive');
|
||||
res.flushHeaders();
|
||||
|
||||
// Send initial connection event
|
||||
res.write('data: {"connected": true}\n\n');
|
||||
|
||||
sseClients.add(res);
|
||||
|
||||
req.on('close', () => {
|
||||
sseClients.delete(res);
|
||||
});
|
||||
});
|
||||
|
||||
// Login Endpoint
|
||||
app.post('/api/login', (req, res) => {
|
||||
const { email, password } = req.body;
|
||||
|
||||
Reference in New Issue
Block a user