mirror of
https://github.com/Matewoo/pdf-writer.git
synced 2026-11-18 18:42:50 +01:00
Update server.js
This commit is contained in:
+2
-2
@@ -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}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user