Repository navigation
feat(api): add lore entity CRUD routes - #19
KareemN1936 wants to merge 1 commit into
Conversation
|
Vercel preview is ready: https://hivelore-2wkr9j8hr-kareemn1936s-projects.vercel.app Commit: e8da35b |
|
@KareemN1936 this is exactly what I asked for on #18 — you dropped the invented-contract-in-the-frontend approach and landed the backend as its own PR, following the repo's route conventions, with tests that cover the negative cases. That last part matters: anonymous draft read → 404, self-publish → 400, cross-contributor PATCH → 403, delete-canon → 409. Most people write happy-path tests only. The authorization design is genuinely sound and I tried to break it:
Blocking: 1. 🔴 Related entries leak drafts to anonymous callers. 2. 🔴 3. 🔴 Wrong base — retarget to 4. Reuse the existing policy helpers. 5. Add 6. Prisma conflicts become 500s. 7. Enum migration ordering. 8. #18 still won't work after this lands — its pages fetch from Next.js server components with no Authorization header (the token isn't reachable server-side), so a freshly created draft 404s and Nits: cap |
No description provided.