do what we can
This commit is contained in:
@@ -19,7 +19,9 @@ app.get('/api/health', (req, res) => res.json({ ok: true, ts: new Date().toISOSt
|
||||
// main endpoint — run the uploader flow (download workbook if env vars exist, create folders and upload PDF)
|
||||
app.post('/api/upload-managers', async (req, res) => {
|
||||
try {
|
||||
const result = await run();
|
||||
// Accept records from request body (sent from Excel add-in)
|
||||
const records = req.body && req.body.records ? req.body.records : null;
|
||||
const result = await run(records);
|
||||
res.json({ ok: true, result });
|
||||
} catch (err) {
|
||||
console.error('Error in /api/upload-managers', err);
|
||||
|
||||
Reference in New Issue
Block a user