Skip to content

Build Content Moderation Report API #57

Description

@aji70

Task: Build Content Moderation Report API

Overview

No reporting flow exists despite admin/audit infrastructure. Enable community safety with a minimal admin review queue.


Goals

  • Entity: ContentReport (reporterId, targetType: post|comment, targetId, reason, status: open|resolved|dismissed)
  • POST /api/v1/reports — authenticated
  • GET /api/v1/admin/reports?status&page&limit — admin
  • PATCH /api/v1/admin/reports/:id — resolve/dismiss + audit log

Deliverables

  • ModerationModule, DTOs, admin guards
  • Audit on resolve/dismiss
  • Integration tests

Acceptance Criteria

  • Duplicate open report from same user on same target returns 409
  • Invalid/missing target returns 404
  • Non-admin cannot access admin routes (403)
  • Resolve/dismiss updates status and records admin actor
  • At least 8 tests

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions