Implement engagement API routes #77

Merged
caradoc merged 1 commit from feat/task-51f1f2e5-engagement-api into main 2026-05-30 23:18:17 -05:00
Collaborator

Summary

  • add protocol-neutral post engagement persistence for likes and boosts
  • add authenticated post engagement summary, likes, and boosts API routes
  • include comment and pending-comment counts in engagement summaries
  • document engagement routes and schemas in OpenAPI
  • add route and migration tests

Verification

  • make check
  • ./scripts/pre-pr.sh

Task: #task-51f1f2e5

## Summary - add protocol-neutral post engagement persistence for likes and boosts - add authenticated post engagement summary, likes, and boosts API routes - include comment and pending-comment counts in engagement summaries - document engagement routes and schemas in OpenAPI - add route and migration tests ## Verification - `make check` - `./scripts/pre-pr.sh` Task: #task-51f1f2e5
feat: implement engagement API routes
All checks were successful
CI / build-lint-test (pull_request) Successful in 31s
a8f170777c
Task: #task-51f1f2e5
Author
Collaborator

PR review approved

Summary:

  • Adds protocol-neutral post engagement persistence for likes and boosts.
  • Adds authenticated engagement summary, likes list, and boosts list routes.
  • Includes total and pending comment counts in summaries.
  • Documents engagement routes and schemas in OpenAPI.
  • Adds route and migration tests.

Acceptance criteria:

  • Can show engagement summary for a post — met by GET /api/v1/posts/{slug}/engagement and summary tests covering likes, boosts, total comments, and pending comments.
  • Can list likes for a post — met by GET /api/v1/posts/{slug}/engagement/likes and likes-list test.
  • Can list boosts for a post — met by GET /api/v1/posts/{slug}/engagement/boosts and boosts-list test.
  • Missing post returns shared 404 — met by missing-post test using NOT_FOUND response shape.
  • Unsupported implementations return standardized 501 Not Implemented — met by missing engagement table test.
  • Every route appears in OpenAPI with documented operation IDs — met by OpenAPI route coverage for all three operation IDs.
  • Relevant lint/test checks pass — make check, ./scripts/pre-pr.sh, and Forgejo CI passed.

Blocking issues: none.

Warnings: none.

Final verdict: approved.

### PR review approved Summary: - Adds protocol-neutral post engagement persistence for likes and boosts. - Adds authenticated engagement summary, likes list, and boosts list routes. - Includes total and pending comment counts in summaries. - Documents engagement routes and schemas in OpenAPI. - Adds route and migration tests. Acceptance criteria: - [x] Can show engagement summary for a post — met by `GET /api/v1/posts/{slug}/engagement` and summary tests covering likes, boosts, total comments, and pending comments. - [x] Can list likes for a post — met by `GET /api/v1/posts/{slug}/engagement/likes` and likes-list test. - [x] Can list boosts for a post — met by `GET /api/v1/posts/{slug}/engagement/boosts` and boosts-list test. - [x] Missing post returns shared `404` — met by missing-post test using `NOT_FOUND` response shape. - [x] Unsupported implementations return standardized `501 Not Implemented` — met by missing engagement table test. - [x] Every route appears in OpenAPI with documented operation IDs — met by OpenAPI route coverage for all three operation IDs. - [x] Relevant lint/test checks pass — `make check`, `./scripts/pre-pr.sh`, and Forgejo CI passed. Blocking issues: none. Warnings: none. Final verdict: approved.
caradoc deleted branch feat/task-51f1f2e5-engagement-api 2026-05-30 23:18:17 -05:00
Sign in to join this conversation.
No description provided.