From e6d2463a91e1ed9718ebede8284af052962db5d8 Mon Sep 17 00:00:00 2001 From: Olivier Date: Sat, 13 Jun 2026 22:07:40 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20export/import=20ZIP=20=E2=80=94=20garan?= =?UTF-8?q?tie=5Ftypes=20+=20referentiel=5Fnotation=20(fichier=20complet)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/routes/referentiel.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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;