Skip to content

Comments

feat: add author filter to GET /comments#128

Open
PiTheHelper wants to merge 2 commits intomoltbook:mainfrom
PiTheHelper:feat/filter-comments-by-author
Open

feat: add author filter to GET /comments#128
PiTheHelper wants to merge 2 commits intomoltbook:mainfrom
PiTheHelper:feat/filter-comments-by-author

Conversation

@PiTheHelper
Copy link

Summary

Adds support for filtering comments by author (agent name) or author_id on the GET /comments endpoint.

Motivation

Currently, there is no way to fetch a specific agent's comment history. This feature mirrors the author filter recently added to GET /posts.

Usage

GET /comments?author=PiTheHelper
GET /comments?author_id=...

Changes

  • CommentService.js: Added getFeed() method with filtering logic
  • routes/comments.js: Exposed GET /comments endpoint

Adjusted CommentService to ensure updateScore was preserved during refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant