Skip to content

feat: Add admin content moderation flag management system#483

Closed
ekumamatthew wants to merge 6 commits intoArena1X:mainfrom
ekumamatthew:content_moderation
Closed

feat: Add admin content moderation flag management system#483
ekumamatthew wants to merge 6 commits intoArena1X:mainfrom
ekumamatthew:content_moderation

Conversation

@ekumamatthew
Copy link
Copy Markdown

Closes #408

  • Create Flag entity with market_id, user_id, reason, status fields
  • Add database migration for flags table
  • Implement POST /flags endpoint for users to flag markets
  • Implement GET /admin/flags endpoint for admins to review flags
  • Implement PATCH /admin/flags/:id/resolve endpoint for flag resolution
  • Add resolution actions: dismiss, remove market, ban user
  • Include comprehensive test coverage
  • Add proper validation and error handling
  • Integrate with analytics service for activity logging

Closes Arena1X#408

- Create Flag entity with market_id, user_id, reason, status fields
- Add database migration for flags table
- Implement POST /flags endpoint for users to flag markets
- Implement GET /admin/flags endpoint for admins to review flags
- Implement PATCH /admin/flags/:id/resolve endpoint for flag resolution
- Add resolution actions: dismiss, remove market, ban user
- Include comprehensive test coverage
- Add proper validation and error handling
- Integrate with analytics service for activity logging
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
insight-arena-4rll Ready Ready Preview, Comment Mar 31, 2026 2:50pm

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@ekumamatthew Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Olowodarey
Copy link
Copy Markdown
Collaborator

@ekumamatthew pls can you help fix conflict

- Resolved merge conflicts in admin controller, service, and module
- Integrated flag management features with existing admin functionality
- Combined imports and dependencies from both branches
- Maintained all existing admin endpoints while adding flag management
@ekumamatthew
Copy link
Copy Markdown
Author

Hi @Olowodarey Pls review and merge. all workflows passed and no conflict

- Fixed remaining merge conflict markers in admin controller and service
- Added FlagsService mocks to all admin service test suites
- Fixed flag service tests by using createMockFlag() function to avoid object mutation
- Updated test assertions to use expect.objectContaining for timestamp fields
- All 226 tests now passing
- Build successful
@ekumamatthew
Copy link
Copy Markdown
Author

Please I've resolved merge conflict and fixed Test.. Please merge

@Olowodarey
Copy link
Copy Markdown
Collaborator

@ekumamatthew test is failing pls check on it

- All 226 tests passing with npm and pnpm
- CI failing because --max-warnings 0 flag treats warnings as errors
- 5 TypeScript lint warnings about unsafe 'any' types in test mocks
- Tests are functionally correct - just need to fix type annotations
- Will fix lint warnings in separate commit to unblock CI
@Olowodarey
Copy link
Copy Markdown
Collaborator

@ekumamatthew pls fix conflict

@ekumamatthew
Copy link
Copy Markdown
Author

Please nau.. I've resolved lot of conflict

- Fixed import conflicts in admin.controller.ts
- Fixed import conflicts in admin.module.ts
- Fixed import conflicts in admin.service.ts
- Combined changes from both branches:
  - Content moderation flag management features
  - Competition participant management
  - Leaderboard history functionality
- All imports properly organized and deduplicated
@ekumamatthew
Copy link
Copy Markdown
Author

Conflict Resolved @Olowodarey

- Added missing FlagsService provider to adminCancelCompetition test suite
- Fixes dependency injection error caused by merge with main branch
- All 234 tests now passing
- Ready for CI pipeline
@ekumamatthew
Copy link
Copy Markdown
Author

Workflow fixed @Olowodarey

victor62-art pushed a commit to victor62-art/InsightArena that referenced this pull request Apr 1, 2026
feat: Add admin content moderation flag management system
@Olowodarey Olowodarey closed this Apr 1, 2026
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.

[Backend] Admin Content Moderation - Flag Management

2 participants