?
This commit is contained in:
parent
97438078fa
commit
69d288eb26
@ -22,7 +22,7 @@ app.post('/print-credentials', async (req, res) => {
|
|||||||
|
|
||||||
// Generate the PDF, saved to disk
|
// Generate the PDF, saved to disk
|
||||||
Thermal.generatePdf(infoArray).then((result) => {
|
Thermal.generatePdf(infoArray).then((result) => {
|
||||||
res.status(200).json({ message: 'PDF file written successfully.' });
|
res.send('PDF file written successfully.');
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
res.status(500).json({ message: 'Error writing PDF file', error: e.message });
|
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
|
// Generate the PDF, saved to disk
|
||||||
Thermal.generatePdf(infoArray).then((result) => {
|
Thermal.generatePdf(infoArray).then((result) => {
|
||||||
res.status(200).json({ message: 'PDF file written successfully.' });
|
res.send('PDF file written successfully.');
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.error(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: err.message });
|
||||||
@ -68,7 +68,7 @@ app.post('/print-mcc', async (req, res) => {
|
|||||||
|
|
||||||
// Generate the PDF, saved to disk
|
// Generate the PDF, saved to disk
|
||||||
Thermal.generatePdf(infoArray).then((result) => {
|
Thermal.generatePdf(infoArray).then((result) => {
|
||||||
res.status(200).json({ message: 'PDF file written successfully.' });
|
res.send('PDF file written successfully.');
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
res.status(500).json({ message: 'Error writing PDF file', error: e.message });
|
res.status(500).json({ message: 'Error writing PDF file', error: e.message });
|
||||||
|
Loading…
Reference in New Issue
Block a user