What: Add an endpoint that allows users to report courses for inappropriate content, errors, or other issues.
Why: Community moderation helps maintain course quality. Users need a way to flag issues they encounter.
Scope: Create course_reports table with course_id, user_id, reason (enum: inappropriate/outdated/error/other), description, status (pending/reviewed/dismissed), created_at. Add POST endpoint. Notify admins of new reports.
Acceptance criteria:
- Users can report courses with a reason
- One report per user per course
- Reports are visible to admins
- Report count is tracked per course
Technical context:src/modules/courses/course.service.ts — course operations. src/database/schema.ts — schema definitions.
What: Add an endpoint that allows users to report courses for inappropriate content, errors, or other issues.
Why: Community moderation helps maintain course quality. Users need a way to flag issues they encounter.
Scope: Create
course_reportstable with course_id, user_id, reason (enum: inappropriate/outdated/error/other), description, status (pending/reviewed/dismissed), created_at. Add POST endpoint. Notify admins of new reports.Acceptance criteria:
Technical context:
src/modules/courses/course.service.ts— course operations.src/database/schema.ts— schema definitions.