..
This commit is contained in:
parent
ffd595f590
commit
e605be20f1
@ -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 });
|
||||||
|
@ -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:',
|
||||||
|
Loading…
Reference in New Issue
Block a user