Files
InsanityLab-web/.superpowers/sdd/task-4-report.md
T
Adriano b913a2bf90 registri dei piani in git (AI-OS#309)
Refs gitea:Adriano/AI-OS#310

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 10:36:26 +02:00

13 lines
979 B
Markdown

### Task 4 report: repository posts — autore e liste per autore
- Status: DONE
- Commit: 6d1e260 — "feat(posts): author_id nel repository + listByAuthor + helper utenti"
- Test: `npm test -- tests/posts.test.ts` → 10 passed (10) — inclusi i 3 nuovi test in `describe('autore articoli')`
- Build: `npm run build` → Complete, nessun errore
- TDD: test aggiunti prima → fallimento confermato (`listByAuthor is not a function`, `getUsernameById is not a function`) → implementazione → successo
- Modifiche:
- `src/lib/posts.ts`: `Post.author_id: number | null`, `PostInput.author_id?: number | null`, `createPost` scrive `author_id` (default null), nuova `listByAuthor(db, authorId)`. `updatePost` non toccato (non modifica author_id, come da spec).
- `src/lib/auth.ts`: nuove `getUsernameById(db, id)` e `listUsers(db)`.
- `tests/posts.test.ts`: import aggiornati + nuovo blocco `describe('autore articoli')` con 3 test verbatim da brief.
- Concern: nessuno.