bug fixes

This commit is contained in:
Guillermo Bonet 2022-11-04 14:53:18 +01:00
parent e1c6e32860
commit 0eb21b7e87
3 changed files with 10 additions and 9 deletions

View File

@ -28,7 +28,6 @@ COPY \
main.js \
print-server.js \
config.yml \
service.js \
entrypoint.sh \
./
COPY sql sql

View File

@ -1,13 +1,13 @@
debug: true
db:
host: localhost
port: 3306
user: user
password: password
database: schema
host: localhost
port: 3306
user: user
password: password
database: schema
salix:
url: http://localhost:3000
user: user
password: password
url: http://localhost:3000
user: user
password: password
reconnectTimeout: 30
refreshRate: 1000

View File

@ -113,6 +113,8 @@ class PrintServer {
});
const printer = printJob.printer;
if (!fs.existsSync(path.join(appDir, 'tmp')))
fs.mkdirSync(path.join(appDir, 'tmp'))
const tmpFilePath = path.join(appDir, 'tmp', `${Math.random().toString(36).substring(7)}.pdf`);
await fs.writeFile(tmpFilePath, response.data, 'binary');