Issue Details
Description: Admins can moderate referrals: flag spam, hide content, suspend poster, and see an audit log of moderation actions.
Proposed plan:
Backend: Add ReferralModerationAction model with adminId, referralId, actionType, reason, createdAt.
API: Admin-only endpoints:
POST /api/admin/referrals/:id/flag
POST /api/admin/referrals/:id/hide
POST /api/admin/referrals/:id/restore
Enforcement: Update referral queries (getReferrals) to exclude hidden/removed referrals for normal users.
Frontend: Add moderation section in existing admin referrals UI (there is frontend/src/admin/AdminReferrals.jsx in the repo).
Audit: Always log the action and reason.
Issue Details
Description: Admins can moderate referrals: flag spam, hide content, suspend poster, and see an audit log of moderation actions.
Proposed plan:
Backend: Add ReferralModerationAction model with adminId, referralId, actionType, reason, createdAt.
API: Admin-only endpoints:
POST /api/admin/referrals/:id/flag
POST /api/admin/referrals/:id/hide
POST /api/admin/referrals/:id/restore
Enforcement: Update referral queries (getReferrals) to exclude hidden/removed referrals for normal users.
Frontend: Add moderation section in existing admin referrals UI (there is frontend/src/admin/AdminReferrals.jsx in the repo).
Audit: Always log the action and reason.