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:
33
backend/app/http/super/content.go
Normal file
33
backend/app/http/super/content.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package super
|
||||
|
||||
import (
|
||||
"quyun/v2/app/http/super/dto"
|
||||
"quyun/v2/app/requests"
|
||||
"quyun/v2/app/services"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// content provides superadmin content endpoints.
|
||||
//
|
||||
// @provider
|
||||
type content struct{}
|
||||
|
||||
// list
|
||||
//
|
||||
// @Summary 内容列表(平台侧汇总)
|
||||
// @Tags Super
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param filter query dto.SuperContentPageFilter true "Filter"
|
||||
// @Success 200 {object} requests.Pager{items=dto.SuperContentItem}
|
||||
//
|
||||
// @Router /super/v1/contents [get]
|
||||
// @Bind filter query
|
||||
func (*content) list(ctx fiber.Ctx, filter *dto.SuperContentPageFilter) (*requests.Pager, error) {
|
||||
if filter == nil {
|
||||
filter = &dto.SuperContentPageFilter{}
|
||||
}
|
||||
filter.Pagination.Format()
|
||||
return services.Content.SuperContentPage(ctx, filter)
|
||||
}
|
||||
Reference in New Issue
Block a user