@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 +1 -1
- package/routes/desktop/api/printers.js +4 -2
- package/server.js +1 -1
package/package.json
CHANGED
|
@@ -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
|
}
|