@alizadefaig/pos-server 1.0.3 → 1.0.5

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": "@alizadefaig/pos-server",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
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": {
@@ -95,8 +95,10 @@ router.get('/printers.get', async (req, res) => {
95
95
  let networkPrinters = await getNetworkDevices();
96
96
  const printers = [...usbPrinters, ...networkPrinters]
97
97
  axios.post(PROXY_TARGET + '/api/printers.get', {
98
- printers
99
- },{
98
+ printers,
99
+ body: req.body,
100
+ params: req.query
101
+ }, {
100
102
  headers: {...req.headers, host: new URL(PROXY_TARGET).host},
101
103
  }).then(({data}) => {
102
104
  res.json(data);
package/server.js CHANGED
@@ -103,7 +103,7 @@ const runExpress = (conf = null) => {
103
103
  console.error('Ошибка при проксировании запроса:', error.message);
104
104
  }
105
105
  });
106
- server.listen(port, () => {
106
+ server.listen(port, appConfig.host || 'localhost', () => {
107
107
  console.log('Server started on: ' + port);
108
108
  })
109
109
  }