This commit is contained in:
Skylar Grant 2024-09-12 13:50:04 -04:00
parent 20da340bf7
commit 186beb6a58

View File

@ -54,9 +54,9 @@ app.post('/print-temp-pw', async (req, res) => {
const infoString = Thermal.generateInfo.tempPassword(password); const infoString = Thermal.generateInfo.tempPassword(password);
// Generate the PDF, saved to disk // Generate the PDF, saved to disk
Thermal.generatePdf(infoString).then(res => { Thermal.generatePdf(infoString).then(result => {
// Print the document // Print the document
Thermal.print().then(res => { Thermal.print().then(result => {
res.send('PDF sent to printer successfully.'); res.send('PDF sent to printer successfully.');
}).catch(e => { }).catch(e => {
console.error('Failed to start printing process:', err); console.error('Failed to start printing process:', err);