feat(moderation): add user profile content moderation for avatars, covers, and bios
All checks were successful
Build Backend / build (push) Successful in 4m24s
Build Backend / build-docker (push) Successful in 1m14s

This commit is contained in:
lafay
2026-04-15 11:50:47 +08:00
parent b6f2df87c4
commit 90495385cd
23 changed files with 1561 additions and 55 deletions

View File

@@ -41,6 +41,7 @@ type Router struct {
adminReportHandler *handler.AdminReportHandler
verificationHandler *handler.VerificationHandler
adminVerificationHandler *handler.AdminVerificationHandler
adminProfileAuditHandler *handler.AdminProfileAuditHandler
wsHandler *handler.WSHandler
logService *service.LogService
jwtService *service.JWTService
@@ -78,6 +79,7 @@ func New(
adminReportHandler *handler.AdminReportHandler,
verificationHandler *handler.VerificationHandler,
adminVerificationHandler *handler.AdminVerificationHandler,
adminProfileAuditHandler *handler.AdminProfileAuditHandler,
logService *service.LogService,
activityService service.UserActivityService,
casbinService service.CasbinService,
@@ -118,6 +120,7 @@ func New(
adminReportHandler: adminReportHandler,
verificationHandler: verificationHandler,
adminVerificationHandler: adminVerificationHandler,
adminProfileAuditHandler: adminProfileAuditHandler,
logService: logService,
jwtService: jwtService,
casbinService: casbinService,
@@ -619,6 +622,13 @@ func (r *Router) setupRoutes() {
admin.GET("/verifications/:id", r.adminVerificationHandler.GetVerificationDetail)
admin.PUT("/verifications/:id/review", r.adminVerificationHandler.ReviewVerification)
}
// 用户资料审核管理
if r.adminProfileAuditHandler != nil {
admin.GET("/profile-audits", r.adminProfileAuditHandler.GetPendingList)
admin.PUT("/profile-audits/:id/moderate", r.adminProfileAuditHandler.ModerateAudit)
admin.POST("/profile-audits/batch-moderate", r.adminProfileAuditHandler.BatchModerate)
}
}
}
}