elpaypg 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elpaypg",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "ELPAY PG - single-backend payment gateway module",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -1120,7 +1120,10 @@ export function registerAdminRoutes(router, ctx) {
1120
1120
 
1121
1121
  // GET /api/v1/admin/stream (SSE for Live Admin Counter & Queue Events)
1122
1122
  router.get('/api/v1/admin/stream', async (req, res) => {
1123
- server.initSse('admin_counter_events', res);
1123
+ res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive', 'Access-Control-Allow-Origin': '*' });
1124
+ res.write('event: connected\ndata: {"status":"connected"}\n\n');
1125
+ const _iv = setInterval(() => { try { res.write(': keepalive\n\n'); } catch {} }, 15000);
1126
+ req.on('close', () => clearInterval(_iv));
1124
1127
  });
1125
1128
 
1126
1129
  // --- WHATSAPP BERRY PROTOCOL MERCHANT SESSION CONFIGURATION ---