Implement posts API routes #64
No reviewers
Labels
No labels
activitypub
admin
api
articles
auth
bug
cleanup
cli
comments
compatibility
config
contacts
database
deployment
design
dev-env
docs
documentation
email
enhancement
feature
federation
feed
homepage
implementation
integration
media
openapi
priority:high
priority:low
priority:medium
proof
public-routes
public-ui
release
safety
social
sources
status:active
status:canceled
status:done
status:inprogress
status:waiting
syndication
tailwind
template
test
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit!64
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/task-782a7074-posts-api-routes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implement the Slugkit posts management API routes for draft article/link/note posts, lifecycle operations, author expansion, and tag assignment.
Task
Task: #task-782a7074
Changes
/api/v1/posts.Testing
POST /api/v1/posts, and listed it by draft status/tag.make checkpasses./scripts/pre-pr.shpassesChecklist
./scripts/pre-pr.shpasses934df7848a498f308915498f308915127d0d594fPR Review: Approved
Summary
Reviewed PR #64 at commit
127d0d5. The PR implements the posts API vertical slice with SQLite persistence, protected post routes, draft/publish lifecycle behavior, author expansion, tag find-or-create assignment, shared error handling, OpenAPI coverage, tests, documentation updates, and the architecture parity note requested before this task.Acceptance Criteria
POST /api/v1/postssupports all three types and tests assert created posts havepublishedAt: null.GET /api/v1/postssupports filters/pagination metadata and omits content in list items;GET /api/v1/posts/:slugreturns full post content.PUT /api/v1/posts/:slugupdates slug/title/content and preservespublishedAt: nullfor drafts.POST /posts/:slug/publishand/unpublishare implemented and tested.authorIdsrequests produce expandedauthorsresponses: met — migration adds minimal contacts/post_authors tables and tests verifyauthorIdsexpands to contact objects.tagSlugsrequests produce expanded tag responses and obey omitted-vs-empty update semantics: met — service creates tags from normalized slugs; tests verify omittedtagSlugspreserves tags andtagSlugs: []clears them.VALIDATION_ERROR; duplicate slugs return sharedCONFLICT; missing posts return sharedNOT_FOUND.make check,./scripts/pre-pr.sh, manual smoke, and Forgejo CI passed.Blocking Issues
None.
Warnings
None.
Verdict
Approved for merge after explicit human approval.