?
This commit is contained in:
parent
7ef2c64bc4
commit
97438078fa
@ -21,7 +21,9 @@ app.post('/print-credentials', async (req, res) => {
|
||||
const infoArray = Thermal.generateInfo.credentials(username, studentId);
|
||||
|
||||
// Generate the PDF, saved to disk
|
||||
Thermal.generatePdf(infoArray).catch(e => {
|
||||
Thermal.generatePdf(infoArray).then((result) => {
|
||||
res.status(200).json({ message: 'PDF file written successfully.' });
|
||||
}).catch(e => {
|
||||
console.error(e);
|
||||
res.status(500).json({ message: 'Error writing PDF file', error: e.message });
|
||||
});
|
||||
@ -46,7 +48,9 @@ app.post('/print-temp-pw', async (req, res) => {
|
||||
const infoArray = Thermal.generateInfo.tempPassword(password);
|
||||
|
||||
// Generate the PDF, saved to disk
|
||||
Thermal.generatePdf(infoArray).catch(e => {
|
||||
Thermal.generatePdf(infoArray).then((result) => {
|
||||
res.status(200).json({ message: 'PDF file written successfully.' });
|
||||
}).catch(e => {
|
||||
console.error(e);
|
||||
res.status(500).json({ message: 'Error writing PDF file', error: err.message });
|
||||
});
|
||||
@ -63,7 +67,9 @@ app.post('/print-mcc', async (req, res) => {
|
||||
const infoArray = Thermal.generateInfo.maineCC();
|
||||
|
||||
// Generate the PDF, saved to disk
|
||||
Thermal.generatePdf(infoArray).catch(e => {
|
||||
Thermal.generatePdf(infoArray).then((result) => {
|
||||
res.status(200).json({ message: 'PDF file written successfully.' });
|
||||
}).catch(e => {
|
||||
console.error(e);
|
||||
res.status(500).json({ message: 'Error writing PDF file', error: e.message });
|
||||
});
|
||||
|
@ -48,7 +48,7 @@ module.exports = {
|
||||
return [
|
||||
{ font: 'public/Outfit-Regular.ttf', text: 'We have changed your password to a temporary password, shown below. Next time you log into Microsoft you will be prompted to change your password.\n', moveDownAfter: true },
|
||||
{ font: 'public/Outfit-Regular.ttf', text: 'Temporary Password:', moveDownAfter: false },
|
||||
{ font: 'public/RobotoMono-SemiBold.ttf', text: `${password}\n`, moveDownAfter: false },
|
||||
{ font: 'public/RobotoMono-SemiBold.ttf', text: `${password}\n`, moveDownAfter: true },
|
||||
{ font: 'public/Outfit-Regular.ttf', text: 'Password requirements:\n8+ characters\n1+ Uppercase\n1+ Lowercase\n1+ Special (!/_=.,?)\n', moveDownAfter: true }
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user