feat: add content report governance

This commit is contained in:
2026-01-16 11:36:04 +08:00
parent 3af3c854c9
commit 609ca7b980
18 changed files with 2480 additions and 101 deletions

View File

@@ -28,6 +28,7 @@ type Routes struct {
assets *assets
auditLogs *auditLogs
comments *comments
contentReports *contentReports
contents *contents
coupons *coupons
creatorApplications *creatorApplications
@@ -94,6 +95,19 @@ func (r *Routes) Register(router fiber.Router) {
PathParam[int64]("id"),
Body[dto.SuperCommentDeleteForm]("form"),
))
// Register routes for controller: contentReports
r.log.Debugf("Registering route: Get /super/v1/content-reports -> contentReports.List")
router.Get("/super/v1/content-reports"[len(r.Path()):], DataFunc1(
r.contentReports.List,
Query[dto.SuperContentReportListFilter]("filter"),
))
r.log.Debugf("Registering route: Post /super/v1/content-reports/:id<int>/process -> contentReports.Process")
router.Post("/super/v1/content-reports/:id<int>/process"[len(r.Path()):], Func3(
r.contentReports.Process,
Local[*models.User]("__ctx_user"),
PathParam[int64]("id"),
Body[dto.SuperContentReportProcessForm]("form"),
))
// Register routes for controller: contents
r.log.Debugf("Registering route: Get /super/v1/contents -> contents.List")
router.Get("/super/v1/contents"[len(r.Path()):], DataFunc1(