Skip to content

[Sprint] Comments: Refactor handlers to use ObjectId and return Result<T> #87

@mpaulosky

Description

@mpaulosky

Problem

Comment handlers have the same ObjectId/Result problems. Note: Comments currently use ObjectId in their query type but string in commands — inconsistency needs resolution.

Depends On

Depends on: Foundation issue (standardize ObjectId in Shared commands/queries)

Files to Modify

  • src/Api/Handlers/Comments/GetCommentHandler.cs — return Task<Result>
  • src/Api/Handlers/Comments/ListCommentsHandler.cs — return Task<Result<IReadOnlyList>>
  • src/Api/Handlers/Comments/CreateCommentHandler.cs — return Task<Result>
  • src/Api/Handlers/Comments/UpdateCommentHandler.cs — return Task<Result>
  • src/Api/Handlers/Comments/DeleteCommentHandler.cs — return Task<Result>
  • src/Api/Handlers/Comments/CommentEndpoints.cs — map Result → HTTP responses

Acceptance Criteria

  • All 5 Comment handlers return Task<Result>
  • ObjectId/string inconsistency in Comment commands/queries resolved consistently
  • CommentEndpoints maps Result → proper HTTP status codes
  • Solution builds with zero errors and zero warnings

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:legolasAssigned to Legolas (Frontend Dev)squad:samAssigned to Sam (Backend Dev)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions