- 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.
89 lines
1.6 KiB
Go
Executable File
89 lines
1.6 KiB
Go
Executable File
package super
|
|
|
|
import (
|
|
"quyun/v2/app/middlewares"
|
|
"quyun/v2/providers/app"
|
|
"quyun/v2/providers/jwt"
|
|
|
|
"go.ipao.vip/atom"
|
|
"go.ipao.vip/atom/container"
|
|
"go.ipao.vip/atom/contracts"
|
|
"go.ipao.vip/atom/opt"
|
|
)
|
|
|
|
func Provide(opts ...opt.Option) error {
|
|
if err := container.Container.Provide(func(
|
|
app *app.Config,
|
|
jwt *jwt.JWT,
|
|
) (*auth, error) {
|
|
obj := &auth{
|
|
app: app,
|
|
jwt: jwt,
|
|
}
|
|
|
|
return obj, nil
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
if err := container.Container.Provide(func() (*content, error) {
|
|
obj := &content{}
|
|
|
|
return obj, nil
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
if err := container.Container.Provide(func() (*order, error) {
|
|
obj := &order{}
|
|
|
|
return obj, nil
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
if err := container.Container.Provide(func(
|
|
auth *auth,
|
|
content *content,
|
|
middlewares *middlewares.Middlewares,
|
|
order *order,
|
|
tenant *tenant,
|
|
user *user,
|
|
) (contracts.HttpRoute, error) {
|
|
obj := &Routes{
|
|
auth: auth,
|
|
content: content,
|
|
middlewares: middlewares,
|
|
order: order,
|
|
tenant: tenant,
|
|
user: user,
|
|
}
|
|
if err := obj.Prepare(); err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return obj, nil
|
|
}, atom.GroupRoutes); err != nil {
|
|
return err
|
|
}
|
|
if err := container.Container.Provide(func() (*staticController, error) {
|
|
obj := &staticController{}
|
|
|
|
return obj, nil
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
if err := container.Container.Provide(func() (*tenant, error) {
|
|
obj := &tenant{}
|
|
|
|
return obj, nil
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
if err := container.Container.Provide(func() (*user, error) {
|
|
obj := &user{}
|
|
|
|
return obj, nil
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|