djalim
|
9368e68622
|
refactor(notes): replace AuthenticatedState with withRules, simplify handlers
refactor: add withRules wrapper to API routes
Use withRules to enforce permissions instead of manual checks.
Remove FORBIDDEN constant, simplify handlers, import withRules,
adjust GET/POST/PUT/DELETE handlers.
Centralizes auth logic.
refactor: replace manual auth checks with withRules wrapper for routes
refactor(student routes): replace manual employee checks with withRules wrapper
|
2026-04-27 19:45:26 +02:00 |
|
djalim
|
b0930b8da2
|
fix: correct handler bugs exposed by test suite
Check Deno code / Check Deno code (pull_request) Failing after 6s
Tests / Unit tests (pull_request) Successful in 13s
Tests / Integration tests (pull_request) Successful in 1m17s
- ajustements [numEtud]/[idUE]: fix .where() missing and() — PUT/DELETE
were applying only numEtud condition, modifying all rows for a student
- modules/users/enseignements POST: add try/catch, return 500 on invalid JSON
- modules/[idModule] PUT: add try/catch + type check on nom (string required)
- modules POST: add .trim() check to reject whitespace-only id/nom
- users POST: add .trim() check to reject whitespace-only id/nom/prenom
- ues POST: add .trim() check to reject whitespace-only nom
- notes POST: add type check (typeof number) and bounds check (0 ≤ note ≤ 20)
- ue-modules POST: add coeff >= 0 validation
Update robustness tests to reflect fixed behavior (remove [BUG] labels,
replace assertRejects with status code assertions).
|
2026-04-26 19:01:53 +02:00 |
|
djalim
|
6db04045f4
|
fix(lint): add version to drizzle-orm imports and prefix unused NOT_FOUND
|
2026-04-26 11:30:33 +00:00 |
|
Clément Oudelet
|
96b7edf77f
|
PMPR-43 : POST /notes - créer une note
|
2026-04-22 17:14:45 +00:00 |
|
Clément Oudelet
|
b2847a4a7d
|
PMPR-42 : GET /notes - récupère les notes
|
2026-04-22 12:20:59 +00:00 |
|