feat: add audit logs and system configs
This commit is contained in:
@@ -26,6 +26,7 @@ type Routes struct {
|
||||
middlewares *middlewares.Middlewares
|
||||
// Controller instances
|
||||
assets *assets
|
||||
auditLogs *auditLogs
|
||||
contents *contents
|
||||
coupons *coupons
|
||||
creatorApplications *creatorApplications
|
||||
@@ -34,6 +35,7 @@ type Routes struct {
|
||||
orders *orders
|
||||
payoutAccounts *payoutAccounts
|
||||
reports *reports
|
||||
systemConfigs *systemConfigs
|
||||
tenants *tenants
|
||||
users *users
|
||||
withdrawals *withdrawals
|
||||
@@ -71,6 +73,12 @@ func (r *Routes) Register(router fiber.Router) {
|
||||
r.assets.Usage,
|
||||
Query[dto.SuperAssetUsageFilter]("filter"),
|
||||
))
|
||||
// Register routes for controller: auditLogs
|
||||
r.log.Debugf("Registering route: Get /super/v1/audit-logs -> auditLogs.List")
|
||||
router.Get("/super/v1/audit-logs"[len(r.Path()):], DataFunc1(
|
||||
r.auditLogs.List,
|
||||
Query[dto.SuperAuditLogListFilter]("filter"),
|
||||
))
|
||||
// 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(
|
||||
@@ -243,6 +251,25 @@ func (r *Routes) Register(router fiber.Router) {
|
||||
r.reports.Export,
|
||||
Body[dto.SuperReportExportForm]("form"),
|
||||
))
|
||||
// Register routes for controller: systemConfigs
|
||||
r.log.Debugf("Registering route: Get /super/v1/system-configs -> systemConfigs.List")
|
||||
router.Get("/super/v1/system-configs"[len(r.Path()):], DataFunc1(
|
||||
r.systemConfigs.List,
|
||||
Query[dto.SuperSystemConfigListFilter]("filter"),
|
||||
))
|
||||
r.log.Debugf("Registering route: Patch /super/v1/system-configs/:id<int> -> systemConfigs.Update")
|
||||
router.Patch("/super/v1/system-configs/:id<int>"[len(r.Path()):], DataFunc3(
|
||||
r.systemConfigs.Update,
|
||||
Local[*models.User]("__ctx_user"),
|
||||
PathParam[int64]("id"),
|
||||
Body[dto.SuperSystemConfigUpdateForm]("form"),
|
||||
))
|
||||
r.log.Debugf("Registering route: Post /super/v1/system-configs -> systemConfigs.Create")
|
||||
router.Post("/super/v1/system-configs"[len(r.Path()):], DataFunc2(
|
||||
r.systemConfigs.Create,
|
||||
Local[*models.User]("__ctx_user"),
|
||||
Body[dto.SuperSystemConfigCreateForm]("form"),
|
||||
))
|
||||
// Register routes for controller: tenants
|
||||
r.log.Debugf("Registering route: Get /super/v1/tenant-join-requests -> tenants.ListJoinRequests")
|
||||
router.Get("/super/v1/tenant-join-requests"[len(r.Path()):], DataFunc1(
|
||||
|
||||
Reference in New Issue
Block a user