feat(moderation): add user profile content moderation for avatars, covers, and bios
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user