// Code generated by atomctl. DO NOT EDIT. // Package v1 provides HTTP route definitions and registration // for the quyun/v2 application. package v1 import ( dto "quyun/v2/app/http/super/v1/dto" v1_dto "quyun/v2/app/http/v1/dto" "quyun/v2/app/middlewares" "quyun/v2/database/models" "github.com/gofiber/fiber/v3" log "github.com/sirupsen/logrus" _ "go.ipao.vip/atom" _ "go.ipao.vip/atom/contracts" . "go.ipao.vip/atom/fen" ) // Routes implements the HttpRoute contract and provides route registration // for all controllers in the v1 module. // // @provider contracts.HttpRoute atom.GroupRoutes type Routes struct { log *log.Entry `inject:"false"` middlewares *middlewares.Middlewares // Controller instances assets *assets auditLogs *auditLogs comments *comments contentReports *contentReports contents *contents coupons *coupons creatorApplications *creatorApplications creators *creators finance *finance healths *healths notifications *notifications orders *orders payoutAccounts *payoutAccounts reports *reports systemConfigs *systemConfigs tenants *tenants users *users withdrawals *withdrawals } // Prepare initializes the routes provider with logging configuration. func (r *Routes) Prepare() error { r.log = log.WithField("module", "routes.v1") r.log.Info("Initializing routes module") return nil } // Name returns the unique identifier for this routes provider. func (r *Routes) Name() string { return "v1" } // Register registers all HTTP routes with the provided fiber router. // Each route is registered with its corresponding controller action and parameter bindings. func (r *Routes) Register(router fiber.Router) { // Register routes for controller: assets r.log.Debugf("Registering route: Delete /super/v1/assets/:id -> assets.Delete") router.Delete("/super/v1/assets/:id"[len(r.Path()):], Func2( r.assets.Delete, PathParam[int64]("id"), Query[dto.SuperAssetDeleteQuery]("query"), )) r.log.Debugf("Registering route: Get /super/v1/assets -> assets.List") router.Get("/super/v1/assets"[len(r.Path()):], DataFunc1( r.assets.List, Query[dto.SuperAssetListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/assets/usage -> assets.Usage") router.Get("/super/v1/assets/usage"[len(r.Path()):], DataFunc1( 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: 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/delete -> comments.Delete") router.Post("/super/v1/comments/:id/delete"[len(r.Path()):], Func3( r.comments.Delete, Local[*models.User]("__ctx_user"), 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/process -> contentReports.Process") router.Post("/super/v1/content-reports/:id/process"[len(r.Path()):], Func3( r.contentReports.Process, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperContentReportProcessForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/content-reports/process/batch -> contentReports.BatchProcess") router.Post("/super/v1/content-reports/process/batch"[len(r.Path()):], Func2( r.contentReports.BatchProcess, Local[*models.User]("__ctx_user"), Body[dto.SuperContentReportBatchProcessForm]("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( r.contents.List, Query[dto.SuperContentListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/contents/statistics -> contents.Statistics") router.Get("/super/v1/contents/statistics"[len(r.Path()):], DataFunc1( r.contents.Statistics, Query[dto.SuperContentStatisticsFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/tenants/:tenantID/contents -> contents.ListTenantContents") router.Get("/super/v1/tenants/:tenantID/contents"[len(r.Path()):], DataFunc2( r.contents.ListTenantContents, PathParam[int64]("tenantID"), Query[dto.SuperContentListFilter]("filter"), )) r.log.Debugf("Registering route: Patch /super/v1/tenants/:tenantID/contents/:contentID/status -> contents.UpdateStatus") router.Patch("/super/v1/tenants/:tenantID/contents/:contentID/status"[len(r.Path()):], Func3( r.contents.UpdateStatus, PathParam[int64]("tenantID"), PathParam[int64]("contentID"), Body[dto.SuperTenantContentStatusUpdateForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/contents/:id/review -> contents.Review") router.Post("/super/v1/contents/:id/review"[len(r.Path()):], Func3( r.contents.Review, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperContentReviewForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/contents/review/batch -> contents.BatchReview") router.Post("/super/v1/contents/review/batch"[len(r.Path()):], Func2( r.contents.BatchReview, Local[*models.User]("__ctx_user"), Body[dto.SuperContentBatchReviewForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/contents/status/batch -> contents.BatchUpdateStatus") router.Post("/super/v1/contents/status/batch"[len(r.Path()):], Func2( r.contents.BatchUpdateStatus, Local[*models.User]("__ctx_user"), Body[dto.SuperContentBatchStatusForm]("form"), )) // Register routes for controller: coupons r.log.Debugf("Registering route: Get /super/v1/coupon-grants -> coupons.ListGrants") router.Get("/super/v1/coupon-grants"[len(r.Path()):], DataFunc1( r.coupons.ListGrants, Query[dto.SuperCouponGrantListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/coupon-risks -> coupons.ListRisks") router.Get("/super/v1/coupon-risks"[len(r.Path()):], DataFunc1( r.coupons.ListRisks, Query[dto.SuperCouponRiskListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/coupons -> coupons.List") router.Get("/super/v1/coupons"[len(r.Path()):], DataFunc1( r.coupons.List, Query[dto.SuperCouponListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/tenants/:tenantID/coupons/:id -> coupons.Get") router.Get("/super/v1/tenants/:tenantID/coupons/:id"[len(r.Path()):], DataFunc2( r.coupons.Get, PathParam[int64]("tenantID"), PathParam[int64]("id"), )) r.log.Debugf("Registering route: Patch /super/v1/coupons/:id/status -> coupons.UpdateStatus") router.Patch("/super/v1/coupons/:id/status"[len(r.Path()):], Func3( r.coupons.UpdateStatus, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperCouponStatusUpdateForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/tenants/:tenantID/coupons -> coupons.Create") router.Post("/super/v1/tenants/:tenantID/coupons"[len(r.Path()):], DataFunc3( r.coupons.Create, Local[*models.User]("__ctx_user"), PathParam[int64]("tenantID"), Body[v1_dto.CouponCreateForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/tenants/:tenantID/coupons/:id/grant -> coupons.Grant") router.Post("/super/v1/tenants/:tenantID/coupons/:id/grant"[len(r.Path()):], DataFunc3( r.coupons.Grant, PathParam[int64]("tenantID"), PathParam[int64]("id"), Body[v1_dto.CouponGrantForm]("form"), )) r.log.Debugf("Registering route: Put /super/v1/tenants/:tenantID/coupons/:id -> coupons.Update") router.Put("/super/v1/tenants/:tenantID/coupons/:id"[len(r.Path()):], DataFunc4( r.coupons.Update, Local[*models.User]("__ctx_user"), PathParam[int64]("tenantID"), PathParam[int64]("id"), Body[v1_dto.CouponUpdateForm]("form"), )) // Register routes for controller: creatorApplications r.log.Debugf("Registering route: Get /super/v1/creator-applications -> creatorApplications.List") router.Get("/super/v1/creator-applications"[len(r.Path()):], DataFunc1( r.creatorApplications.List, Query[dto.TenantListFilter]("filter"), )) r.log.Debugf("Registering route: Post /super/v1/creator-applications/:id/review -> creatorApplications.Review") router.Post("/super/v1/creator-applications/:id/review"[len(r.Path()):], Func3( r.creatorApplications.Review, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperCreatorApplicationReviewForm]("form"), )) // Register routes for controller: creators r.log.Debugf("Registering route: Get /super/v1/creators -> creators.List") router.Get("/super/v1/creators"[len(r.Path()):], DataFunc1( r.creators.List, Query[dto.TenantListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/creators/:tenantID/settings -> creators.GetSettings") router.Get("/super/v1/creators/:tenantID/settings"[len(r.Path()):], DataFunc1( r.creators.GetSettings, PathParam[int64]("tenantID"), )) r.log.Debugf("Registering route: Put /super/v1/creators/:tenantID/settings -> creators.UpdateSettings") router.Put("/super/v1/creators/:tenantID/settings"[len(r.Path()):], Func3( r.creators.UpdateSettings, Local[*models.User]("__ctx_user"), PathParam[int64]("tenantID"), Body[v1_dto.Settings]("form"), )) // 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: healths r.log.Debugf("Registering route: Get /super/v1/health/overview -> healths.Overview") router.Get("/super/v1/health/overview"[len(r.Path()):], DataFunc1( r.healths.Overview, Query[dto.SuperHealthOverviewFilter]("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( r.notifications.List, Query[dto.SuperNotificationListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/notifications/templates -> notifications.ListTemplates") router.Get("/super/v1/notifications/templates"[len(r.Path()):], DataFunc1( r.notifications.ListTemplates, Query[dto.SuperNotificationTemplateListFilter]("filter"), )) r.log.Debugf("Registering route: Patch /super/v1/notifications/templates/:id -> notifications.UpdateTemplate") router.Patch("/super/v1/notifications/templates/:id"[len(r.Path()):], DataFunc3( r.notifications.UpdateTemplate, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperNotificationTemplateUpdateForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/notifications/broadcast -> notifications.Broadcast") router.Post("/super/v1/notifications/broadcast"[len(r.Path()):], Func1( r.notifications.Broadcast, Body[dto.SuperNotificationBroadcastForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/notifications/templates -> notifications.CreateTemplate") router.Post("/super/v1/notifications/templates"[len(r.Path()):], DataFunc1( r.notifications.CreateTemplate, Body[dto.SuperNotificationTemplateCreateForm]("form"), )) // Register routes for controller: orders r.log.Debugf("Registering route: Get /super/v1/orders -> orders.List") router.Get("/super/v1/orders"[len(r.Path()):], DataFunc1( r.orders.List, Query[dto.SuperOrderListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/orders/:id -> orders.Get") router.Get("/super/v1/orders/:id"[len(r.Path()):], DataFunc1( r.orders.Get, PathParam[int64]("id"), )) r.log.Debugf("Registering route: Get /super/v1/orders/statistics -> orders.Statistics") router.Get("/super/v1/orders/statistics"[len(r.Path()):], DataFunc0( r.orders.Statistics, )) r.log.Debugf("Registering route: Post /super/v1/orders/:id/flag -> orders.Flag") router.Post("/super/v1/orders/:id/flag"[len(r.Path()):], Func3( r.orders.Flag, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperOrderFlagForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/orders/:id/reconcile -> orders.Reconcile") router.Post("/super/v1/orders/:id/reconcile"[len(r.Path()):], Func3( r.orders.Reconcile, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperOrderReconcileForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/orders/:id/refund -> orders.Refund") router.Post("/super/v1/orders/:id/refund"[len(r.Path()):], Func2( r.orders.Refund, PathParam[int64]("id"), Body[dto.SuperOrderRefundForm]("form"), )) // Register routes for controller: payoutAccounts r.log.Debugf("Registering route: Delete /super/v1/payout-accounts/:id -> payoutAccounts.Remove") router.Delete("/super/v1/payout-accounts/:id"[len(r.Path()):], Func2( r.payoutAccounts.Remove, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), )) r.log.Debugf("Registering route: Get /super/v1/payout-accounts -> payoutAccounts.List") router.Get("/super/v1/payout-accounts"[len(r.Path()):], DataFunc1( r.payoutAccounts.List, Query[dto.SuperPayoutAccountListFilter]("filter"), )) r.log.Debugf("Registering route: Patch /super/v1/payout-accounts/:id -> payoutAccounts.Update") router.Patch("/super/v1/payout-accounts/:id"[len(r.Path()):], Func3( r.payoutAccounts.Update, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperPayoutAccountUpdateForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/creators/:tenantID/payout-accounts -> payoutAccounts.Create") router.Post("/super/v1/creators/:tenantID/payout-accounts"[len(r.Path()):], Func3( r.payoutAccounts.Create, Local[*models.User]("__ctx_user"), PathParam[int64]("tenantID"), Body[dto.SuperPayoutAccountCreateForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/payout-accounts/:id/review -> payoutAccounts.Review") router.Post("/super/v1/payout-accounts/:id/review"[len(r.Path()):], Func3( r.payoutAccounts.Review, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperPayoutAccountReviewForm]("form"), )) // Register routes for controller: reports r.log.Debugf("Registering route: Get /super/v1/reports/overview -> reports.Overview") router.Get("/super/v1/reports/overview"[len(r.Path()):], DataFunc1( r.reports.Overview, Query[dto.SuperReportOverviewFilter]("filter"), )) r.log.Debugf("Registering route: Post /super/v1/reports/export -> reports.Export") router.Post("/super/v1/reports/export"[len(r.Path()):], DataFunc1( 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 -> systemConfigs.Update") router.Patch("/super/v1/system-configs/:id"[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( r.tenants.ListJoinRequests, Query[dto.SuperTenantJoinRequestListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/tenants -> tenants.List") router.Get("/super/v1/tenants"[len(r.Path()):], DataFunc1( r.tenants.List, Query[dto.TenantListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/tenants/:id -> tenants.Get") router.Get("/super/v1/tenants/:id"[len(r.Path()):], DataFunc1( r.tenants.Get, PathParam[int64]("id"), )) r.log.Debugf("Registering route: Get /super/v1/tenants/:tenantID/users -> tenants.ListUsers") router.Get("/super/v1/tenants/:tenantID/users"[len(r.Path()):], DataFunc2( r.tenants.ListUsers, PathParam[int64]("tenantID"), Query[dto.SuperTenantUserListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/tenants/health -> tenants.Health") router.Get("/super/v1/tenants/health"[len(r.Path()):], DataFunc1( r.tenants.Health, Query[dto.TenantListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/tenants/statuses -> tenants.Statuses") router.Get("/super/v1/tenants/statuses"[len(r.Path()):], DataFunc0( r.tenants.Statuses, )) r.log.Debugf("Registering route: Patch /super/v1/tenants/:id -> tenants.UpdateExpire") router.Patch("/super/v1/tenants/:id"[len(r.Path()):], Func2( r.tenants.UpdateExpire, PathParam[int64]("id"), Body[dto.TenantExpireUpdateForm]("form"), )) r.log.Debugf("Registering route: Patch /super/v1/tenants/:id/status -> tenants.UpdateStatus") router.Patch("/super/v1/tenants/:id/status"[len(r.Path()):], Func2( r.tenants.UpdateStatus, PathParam[int64]("id"), Body[dto.TenantStatusUpdateForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/tenant-join-requests/:id/review -> tenants.ReviewJoinRequest") router.Post("/super/v1/tenant-join-requests/:id/review"[len(r.Path()):], Func3( r.tenants.ReviewJoinRequest, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[v1_dto.TenantJoinReviewForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/tenants -> tenants.Create") router.Post("/super/v1/tenants"[len(r.Path()):], Func1( r.tenants.Create, Body[dto.TenantCreateForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/tenants/:tenantID/invites -> tenants.CreateInvite") router.Post("/super/v1/tenants/:tenantID/invites"[len(r.Path()):], DataFunc2( r.tenants.CreateInvite, PathParam[int64]("tenantID"), Body[v1_dto.TenantInviteCreateForm]("form"), )) // Register routes for controller: users r.log.Debugf("Registering route: Get /super/v1/users -> users.List") router.Get("/super/v1/users"[len(r.Path()):], DataFunc1( r.users.List, Query[dto.UserListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id -> users.Get") router.Get("/super/v1/users/:id"[len(r.Path()):], DataFunc1( r.users.Get, PathParam[int64]("id"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id/coupons -> users.ListCoupons") router.Get("/super/v1/users/:id/coupons"[len(r.Path()):], DataFunc2( r.users.ListCoupons, PathParam[int64]("id"), Query[dto.SuperUserCouponListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id/favorites -> users.ListFavorites") router.Get("/super/v1/users/:id/favorites"[len(r.Path()):], DataFunc2( r.users.ListFavorites, PathParam[int64]("id"), Query[dto.SuperUserContentActionListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id/following -> users.ListFollowing") router.Get("/super/v1/users/:id/following"[len(r.Path()):], DataFunc2( r.users.ListFollowing, PathParam[int64]("id"), Query[dto.SuperUserTenantListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id/library -> users.ListLibrary") router.Get("/super/v1/users/:id/library"[len(r.Path()):], DataFunc2( r.users.ListLibrary, PathParam[int64]("id"), Query[dto.SuperUserLibraryListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id/likes -> users.ListLikes") router.Get("/super/v1/users/:id/likes"[len(r.Path()):], DataFunc2( r.users.ListLikes, PathParam[int64]("id"), Query[dto.SuperUserContentActionListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id/notifications -> users.ListNotifications") router.Get("/super/v1/users/:id/notifications"[len(r.Path()):], DataFunc2( r.users.ListNotifications, PathParam[int64]("id"), Query[dto.SuperUserNotificationListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id/realname -> users.RealName") router.Get("/super/v1/users/:id/realname"[len(r.Path()):], DataFunc1( r.users.RealName, PathParam[int64]("id"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id/tenants -> users.ListTenants") router.Get("/super/v1/users/:id/tenants"[len(r.Path()):], DataFunc2( r.users.ListTenants, PathParam[int64]("id"), Query[dto.SuperUserTenantListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/:id/wallet -> users.Wallet") router.Get("/super/v1/users/:id/wallet"[len(r.Path()):], DataFunc1( r.users.Wallet, PathParam[int64]("id"), )) r.log.Debugf("Registering route: Get /super/v1/users/statistics -> users.Statistics") router.Get("/super/v1/users/statistics"[len(r.Path()):], DataFunc0( r.users.Statistics, )) r.log.Debugf("Registering route: Get /super/v1/users/statuses -> users.Statuses") router.Get("/super/v1/users/statuses"[len(r.Path()):], DataFunc0( r.users.Statuses, )) r.log.Debugf("Registering route: Patch /super/v1/users/:id -> users.UpdateProfile") router.Patch("/super/v1/users/:id"[len(r.Path()):], Func3( r.users.UpdateProfile, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperUserProfileUpdateForm]("form"), )) r.log.Debugf("Registering route: Patch /super/v1/users/:id/roles -> users.UpdateRoles") router.Patch("/super/v1/users/:id/roles"[len(r.Path()):], Func2( r.users.UpdateRoles, PathParam[int64]("id"), Body[dto.UserRolesUpdateForm]("form"), )) r.log.Debugf("Registering route: Patch /super/v1/users/:id/status -> users.UpdateStatus") router.Patch("/super/v1/users/:id/status"[len(r.Path()):], Func2( r.users.UpdateStatus, PathParam[int64]("id"), Body[dto.UserStatusUpdateForm]("form"), )) // Register routes for controller: withdrawals r.log.Debugf("Registering route: Get /super/v1/withdrawals -> withdrawals.List") router.Get("/super/v1/withdrawals"[len(r.Path()):], DataFunc1( r.withdrawals.List, Query[dto.SuperOrderListFilter]("filter"), )) r.log.Debugf("Registering route: Post /super/v1/withdrawals/:id/approve -> withdrawals.Approve") router.Post("/super/v1/withdrawals/:id/approve"[len(r.Path()):], Func2( r.withdrawals.Approve, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), )) r.log.Debugf("Registering route: Post /super/v1/withdrawals/:id/reject -> withdrawals.Reject") router.Post("/super/v1/withdrawals/:id/reject"[len(r.Path()):], Func3( r.withdrawals.Reject, Local[*models.User]("__ctx_user"), PathParam[int64]("id"), Body[dto.SuperWithdrawalRejectForm]("form"), )) r.log.Info("Successfully registered all routes") }