This commit is contained in:
Skylar Grant 2024-09-13 10:06:12 -04:00
parent 97438078fa
commit 69d288eb26

View File

@ -22,7 +22,7 @@ app.post('/print-credentials', async (req, res) => {
// Generate the PDF, saved to disk
Thermal.generatePdf(infoArray).then((result) => {
res.status(200).json({ message: 'PDF file written successfully.' });
res.send('PDF file written successfully.');
}).catch(e => {
console.error(e);
res.status(500).json({ message: 'Error writing PDF file', error: e.message });
@ -49,7 +49,7 @@ app.post('/print-temp-pw', async (req, res) => {
// Generate the PDF, saved to disk
Thermal.generatePdf(infoArray).then((result) => {
res.status(200).json({ message: 'PDF file written successfully.' });
res.send('PDF file written successfully.');
}).catch(e => {
console.error(e);
res.status(500).json({ message: 'Error writing PDF file', error: err.message });
@ -68,7 +68,7 @@ app.post('/print-mcc', async (req, res) => {
// Generate the PDF, saved to disk
Thermal.generatePdf(infoArray).then((result) => {
res.status(200).json({ message: 'PDF file written successfully.' });
res.send('PDF file written successfully.');
}).catch(e => {
console.error(e);
res.status(500).json({ message: 'Error writing PDF file', error: e.message });