..
This commit is contained in:
parent
ffd595f590
commit
e605be20f1
@ -10,7 +10,7 @@ app.use(express.static('public'));
|
||||
// Test print function
|
||||
app.post('/test-print', async (req, res) => {
|
||||
try {
|
||||
Thermal.generateFile('Grant.Aiden2', '5012345');
|
||||
Thermal.generateFile('Grant.Aiden2', '5012345', req, res);
|
||||
} catch (error) {
|
||||
console.error('Print Error:', error);
|
||||
res.status(500).json({ message: 'Print Error', error: error.message });
|
||||
|
@ -3,7 +3,7 @@ const { spawn } = require('child_process');
|
||||
|
||||
|
||||
module.exports = {
|
||||
generateFile(username, studentId) {
|
||||
generateFile(username, studentId, req, res) {
|
||||
// Create the output text
|
||||
const infoArray = [
|
||||
'Username:',
|
||||
|
Loading…
Reference in New Issue
Block a user