@alizadefaig/pos-server 1.0.8 → 1.0.9

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.
@@ -10,6 +10,9 @@ module.exports = (server = null) => {
10
10
 
11
11
  serverSocket.on('connection', (socket) => {
12
12
  socket.join(socket.handshake.query.company_id);
13
+ socket.onAny((companyId, eventName, ...args) => {
14
+ serverSocket.to(companyId).emit(eventName, ...args);
15
+ });
13
16
  });
14
17
  }
15
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alizadefaig/pos-server",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Server in express js with Proxy to Main server if need and will work with Electron JS",
5
5
  "homepage": "https://gitlab.com/faigalizade/pos-server#readme",
6
6
  "bugs": {
@@ -99,7 +99,7 @@ router.get('/printers.get', async (req, res) => {
99
99
  body: req.body,
100
100
  params: req.query
101
101
  }, {
102
- headers: {...req.headers, host: new URL(PROXY_TARGET).host},
102
+ headers: {...req.headers, host: new URL(PROXY_TARGET).host, Accept: 'application/json'},
103
103
  }).then(({data}) => {
104
104
  res.json(data);
105
105
  }).catch(e => {