diff --git a/backend/src/routes/referentiel.js b/backend/src/routes/referentiel.js index 6059639..cf777e2 100644 --- a/backend/src/routes/referentiel.js +++ b/backend/src/routes/referentiel.js @@ -1071,4 +1071,13 @@ router.put('/notation/:notationId', (req, res, next) => { }); // DELETE /api/referentiel/notation/:notationId -rou \ No newline at end of file +router.delete('/notation/:notationId', (req, res, next) => { + try { + const existing = db.prepare('SELECT id FROM referentiel_notation WHERE id = ?').get(req.params.notationId); + if (!existing) throw new HttpError(404, 'Critere introuvable'); + db.prepare('DELETE FROM referentiel_notation WHERE id = ?').run(req.params.notationId); + res.json({ deleted: true }); + } catch (e) { next(e); } +}); + +export default router;