Skip to content

feat: add admin moderation panel API#61

Open
zhero-o wants to merge 1 commit intoLumina-eX:mainfrom
zhero-o:feat/admin-moderation-panel
Open

feat: add admin moderation panel API#61
zhero-o wants to merge 1 commit intoLumina-eX:mainfrom
zhero-o:feat/admin-moderation-panel

Conversation

@zhero-o
Copy link
Copy Markdown

@zhero-o zhero-o commented Mar 29, 2026

  • Add DB migration (004) to support admin role, user ban fields, contract freeze fields, and admin_audit_log table
  • Implement withAdmin HOF and checkAdmin helper for role-based access control
  • Add audit logging utility that writes every moderation action to DB
  • Disputes: GET list (paginated, filterable), GET detail, PATCH status/resolution
  • Contracts: POST freeze, DELETE unfreeze with reason validation
  • Users: POST ban, DELETE unban with self-ban guard
  • Audit log: GET entries filterable by resource_type and admin_wallet
  • Add Vitest with 28 passing unit tests covering all endpoints and middleware

Closes #55

- Add DB migration (004) to support admin role, user ban fields, contract
  freeze fields, and admin_audit_log table
- Implement withAdmin HOF and checkAdmin helper for role-based access control
- Add audit logging utility that writes every moderation action to DB
- Disputes: GET list (paginated, filterable), GET detail, PATCH status/resolution
- Contracts: POST freeze, DELETE unfreeze with reason validation
- Users: POST ban, DELETE unban with self-ban guard
- Audit log: GET entries filterable by resource_type and admin_wallet
- Add Vitest with 28 passing unit tests covering all endpoints and middleware
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@zhero-o 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

@SudiptaPaul-31
Copy link
Copy Markdown
Collaborator

@zhero-o build fails

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.

[Feature]: Admin Moderation Panel API

2 participants