This commit is contained in:
KS Jannette
2026-02-13 11:41:38 -05:00
parent 6ed41c0e82
commit e3cd791745
2 changed files with 3 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ router.get('/', async (req, res) => {
const notes = await loadNotes();
res.json(notes);
} catch (err) {
console.error(`Error loading notes: ${err}`)
res.status(500).json({ error: 'Failed to load notes' });
}
});
@@ -30,6 +31,7 @@ router.post('/cluster', async (req, res) => {
const clusters = await clusterNotes(notes);
res.json(clusters);
} catch (err) {
console.error(`Clustering failed: ${err}` )
res.status(500).json({ error: `Clustering failed: ${err}` });
}
});