This commit is contained in:
Skylar Grant 2024-09-09 13:05:03 -04:00
parent ffd595f590
commit e605be20f1
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ app.use(express.static('public'));
// Test print function // Test print function
app.post('/test-print', async (req, res) => { app.post('/test-print', async (req, res) => {
try { try {
Thermal.generateFile('Grant.Aiden2', '5012345'); Thermal.generateFile('Grant.Aiden2', '5012345', req, res);
} catch (error) { } catch (error) {
console.error('Print Error:', error); console.error('Print Error:', error);
res.status(500).json({ message: 'Print Error', error: error.message }); res.status(500).json({ message: 'Print Error', error: error.message });

View File

@ -3,7 +3,7 @@ const { spawn } = require('child_process');
module.exports = { module.exports = {
generateFile(username, studentId) { generateFile(username, studentId, req, res) {
// Create the output text // Create the output text
const infoArray = [ const infoArray = [
'Username:', 'Username:',