feat: add content management feature for superadmin
- Implemented API endpoint for fetching content list with filtering, sorting, and pagination. - Added DTOs for content items and tenant information. - Created frontend components for content management, including search and data table functionalities. - Updated routing to include content management page. - Enhanced the superadmin menu to navigate to the new content management section. - Included necessary styles and scripts for the new content management interface.
This commit is contained in:
@@ -24,10 +24,11 @@ type Routes struct {
|
||||
log *log.Entry `inject:"false"`
|
||||
middlewares *middlewares.Middlewares
|
||||
// Controller instances
|
||||
auth *auth
|
||||
order *order
|
||||
tenant *tenant
|
||||
user *user
|
||||
auth *auth
|
||||
content *content
|
||||
order *order
|
||||
tenant *tenant
|
||||
user *user
|
||||
}
|
||||
|
||||
// Prepare initializes the routes provider with logging configuration.
|
||||
@@ -55,6 +56,12 @@ func (r *Routes) Register(router fiber.Router) {
|
||||
r.auth.login,
|
||||
Body[dto.LoginForm]("form"),
|
||||
))
|
||||
// Register routes for controller: content
|
||||
r.log.Debugf("Registering route: Get /super/v1/contents -> content.list")
|
||||
router.Get("/super/v1/contents"[len(r.Path()):], DataFunc1(
|
||||
r.content.list,
|
||||
Query[dto.SuperContentPageFilter]("filter"),
|
||||
))
|
||||
// Register routes for controller: order
|
||||
r.log.Debugf("Registering route: Get /super/v1/orders -> order.list")
|
||||
router.Get("/super/v1/orders"[len(r.Path()):], DataFunc1(
|
||||
|
||||
Reference in New Issue
Block a user