[30a88f42] feat: Centralize API key handling and fix product enrichment\n\n- Centralized GEMINI_API_KEY loading from project root .env file.\n- Corrected product enrichment: added /enrich-product endpoint in Node.js, implemented mode in Python backend, and updated frontend to use new API for product analysis.\n- Fixed to pass product data correctly for enrichment.\n- Updated documentation ().

This commit is contained in:
2026-02-17 07:14:51 +00:00
parent 06ef8c00ec
commit 53d791d4e2
6 changed files with 94 additions and 13 deletions

View File

@@ -89,6 +89,15 @@ router.post('/next-step', (req, res) => {
} catch (e) { res.status(500).json({ error: e.message }); }
});
router.post('/enrich-product', (req, res) => {
const { productName, productUrl, language } = req.body;
const args = [SCRIPT_PATH, '--mode', 'enrich_product', '--product_name', productName, '--language', language];
if (productUrl) {
args.push('--product_url', productUrl);
}
runPythonScript(args, res);
});
router.get('/projects', (req, res) => runPythonScript([dbScript, 'list'], res));
router.get('/projects/:id', (req, res) => runPythonScript([dbScript, 'load', req.params.id], res));
router.delete('/projects/:id', (req, res) => runPythonScript([dbScript, 'delete', req.params.id], res));