Update server.js

This commit is contained in:
Mateo Körber Belmonte
2025-03-08 23:36:46 +01:00
parent 1fd1ac419b
commit 96ee1f4e79
+2 -2
View File
@@ -350,7 +350,7 @@ app.post('/generate-pdf', requireLogin, (req, res) => {
try { try {
if (type === 'week' && trans === '') { if (type === 'week' && trans === '') {
console.log('Generating PDF for week:', val); console.log('Generating PDF for week:', val);
pdfPath = `python.exe .\\scripts\\writeWeeklyMenuDE.py ${val}`; pdfPath = `python3 scripts/writeWeeklyMenuDE.py ${val}`;
} else if (type === 'week' && trans !== '') { } else if (type === 'week' && trans !== '') {
console.log('Generating EN PDF for week:', val); console.log('Generating EN PDF for week:', val);
@@ -359,7 +359,7 @@ app.post('/generate-pdf', requireLogin, (req, res) => {
fs.writeFileSync(tempJsonPath, JSON.stringify(trans, null, 2), 'utf8'); fs.writeFileSync(tempJsonPath, JSON.stringify(trans, null, 2), 'utf8');
// Call Python script without passing the translations as command line argument // Call Python script without passing the translations as command line argument
pdfPath = `python.exe .\\scripts\\writeWeeklyMenuEN.py ${val}`; pdfPath = `python3 scripts/writeWeeklyMenuEN.py ${val}`;
} else if (type === 'day') { } else if (type === 'day') {
console.log('Generating PDF for daily:', val); console.log('Generating PDF for daily:', val);
pdfPath = `python3 scripts/writeDailyMenu.py ${val}`; pdfPath = `python3 scripts/writeDailyMenu.py ${val}`;