fix: change help download from .docx to .pdf
This commit is contained in:
@@ -473,11 +473,11 @@ router.get('/master-template', async (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
// GET /api/carbone/help-docx - Download tags reference as .docx
|
||||
router.get('/help-docx', (req, res) => {
|
||||
const helpPath = path.join(TEMPLATES_DIR, 'HELP_TAGS_REFERENCE.docx');
|
||||
// GET /api/carbone/help-pdf - Download tags reference as .pdf
|
||||
router.get('/help-pdf', (req, res) => {
|
||||
const helpPath = path.join(TEMPLATES_DIR, 'HELP_TAGS_REFERENCE.pdf');
|
||||
if (fs.existsSync(helpPath)) {
|
||||
res.download(helpPath, 'Carbone_Tags_Reference.docx');
|
||||
res.download(helpPath, 'Carbone_Tags_Reference.pdf');
|
||||
} else {
|
||||
res.status(404).json({ error: 'Help file not found' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user