From 6a6bb1c99da644e0a7e3b08e916aa282ef3285f3 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Thu, 12 Sep 2024 13:42:43 -0400 Subject: [PATCH] . --- mccs-it/thermal/app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mccs-it/thermal/app.js b/mccs-it/thermal/app.js index f72a271..f481840 100644 --- a/mccs-it/thermal/app.js +++ b/mccs-it/thermal/app.js @@ -26,16 +26,16 @@ app.post('/print-credentials', async (req, res) => { Thermal.print().then(res => { res.send('PDF sent to printer successfully.'); }).catch(e => { - console.error('Failed to start printing process:', err); - res.status(500).json({ message: 'Failed to start printing process', error: err.message }); + console.error('Failed to start printing process:', e); + res.status(500).json({ message: 'Failed to start printing process', error: e.message }); }); }).catch(e => { console.error(e); - res.status(500).json({ message: 'Error writing PDF file', error: err.message }); + res.status(500).json({ message: 'Error writing PDF file', error: e.message }); }); - } catch (error) { - console.error('Print Error:', error); - res.status(500).json({ message: 'Print Error', error: error.message }); + } catch (e) { + console.error('Print Error:', e); + res.status(500).json({ message: 'Print Error', error: e.message }); } });