Implement posts API routes #29
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#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Goal
Implement the Slugkit posts management API for articles, links, and notes.
Spec:
docs/specs/02-posts-routes.mdRequirements
/posts/by-slugalternatives.authorIdsin requests and expandedauthorsin responses.tagSlugsin requests and expanded tag objects in responses.tagSlugsleaves tags unchanged andtagSlugs: []removes all tags.Acceptance criteria
authorIdsrequests produce expandedauthorsresponses.tagSlugsrequests produce expanded tag responses and obey omitted-vs-empty update semantics.Dependencies
Synced from todu comment by @todu on 2026-05-23T00:55:03.963Z
PR Review: Approved
PR: #64
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
authorIdsrequests produce expandedauthorsresponses.tagSlugsrequests produce expanded tag responses and obey omitted-vs-empty update semantics.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.
Synced from todu comment by @todu on 2026-05-23T01:52:35.541Z
Closing Summary
PR #64 merged: #64
Acceptance criteria evidence:
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, PR review, and Forgejo CI passed.Readiness: READY