feat: add super comment governance and finance oversight
This commit is contained in:
@@ -27,10 +27,12 @@ type Routes struct {
|
||||
// Controller instances
|
||||
assets *assets
|
||||
auditLogs *auditLogs
|
||||
comments *comments
|
||||
contents *contents
|
||||
coupons *coupons
|
||||
creatorApplications *creatorApplications
|
||||
creators *creators
|
||||
finance *finance
|
||||
notifications *notifications
|
||||
orders *orders
|
||||
payoutAccounts *payoutAccounts
|
||||
@@ -79,6 +81,19 @@ func (r *Routes) Register(router fiber.Router) {
|
||||
r.auditLogs.List,
|
||||
Query[dto.SuperAuditLogListFilter]("filter"),
|
||||
))
|
||||
// Register routes for controller: comments
|
||||
r.log.Debugf("Registering route: Get /super/v1/comments -> comments.List")
|
||||
router.Get("/super/v1/comments"[len(r.Path()):], DataFunc1(
|
||||
r.comments.List,
|
||||
Query[dto.SuperCommentListFilter]("filter"),
|
||||
))
|
||||
r.log.Debugf("Registering route: Post /super/v1/comments/:id<int>/delete -> comments.Delete")
|
||||
router.Post("/super/v1/comments/:id<int>/delete"[len(r.Path()):], Func3(
|
||||
r.comments.Delete,
|
||||
Local[*models.User]("__ctx_user"),
|
||||
PathParam[int64]("id"),
|
||||
Body[dto.SuperCommentDeleteForm]("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(
|
||||
@@ -186,6 +201,22 @@ func (r *Routes) Register(router fiber.Router) {
|
||||
r.creators.List,
|
||||
Query[dto.TenantListFilter]("filter"),
|
||||
))
|
||||
// Register routes for controller: finance
|
||||
r.log.Debugf("Registering route: Get /super/v1/finance/anomalies/balances -> finance.ListBalanceAnomalies")
|
||||
router.Get("/super/v1/finance/anomalies/balances"[len(r.Path()):], DataFunc1(
|
||||
r.finance.ListBalanceAnomalies,
|
||||
Query[dto.SuperBalanceAnomalyFilter]("filter"),
|
||||
))
|
||||
r.log.Debugf("Registering route: Get /super/v1/finance/anomalies/orders -> finance.ListOrderAnomalies")
|
||||
router.Get("/super/v1/finance/anomalies/orders"[len(r.Path()):], DataFunc1(
|
||||
r.finance.ListOrderAnomalies,
|
||||
Query[dto.SuperOrderAnomalyFilter]("filter"),
|
||||
))
|
||||
r.log.Debugf("Registering route: Get /super/v1/finance/ledgers -> finance.ListLedgers")
|
||||
router.Get("/super/v1/finance/ledgers"[len(r.Path()):], DataFunc1(
|
||||
r.finance.ListLedgers,
|
||||
Query[dto.SuperLedgerListFilter]("filter"),
|
||||
))
|
||||
// Register routes for controller: notifications
|
||||
r.log.Debugf("Registering route: Get /super/v1/notifications -> notifications.List")
|
||||
router.Get("/super/v1/notifications"[len(r.Path()):], DataFunc1(
|
||||
|
||||
Reference in New Issue
Block a user