mirror of
https://github.com/Matewoo/pdf-writer.git
synced 2026-11-18 18:42:50 +01:00
small changes
This commit is contained in:
+5
-5
@@ -208,16 +208,16 @@ app.get('/load-day-daily', (req, res) => {
|
||||
const { exec } = require('child_process');
|
||||
|
||||
app.post('/generate-pdf', (req, res) => {
|
||||
const { week, type } = req.body;
|
||||
const { val, type } = req.body;
|
||||
let pdfPath;
|
||||
console.log('Type:', type);
|
||||
console.log('Week:', week);
|
||||
console.log('Val:', val);
|
||||
|
||||
if (type === 'week') {
|
||||
console.log('Generating PDF for week:', week);
|
||||
pdfPath = `python.exe .\\scripts\\writePdf.py ${week}`;
|
||||
console.log('Generating PDF for week:', val);
|
||||
pdfPath = `python.exe .\\scripts\\writePdf.py ${val}`;
|
||||
} else {
|
||||
console.log('Generating PDF for daily:', week);
|
||||
console.log('Generating PDF for daily:', val);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user