- Implemented Invite management with creation, searching, and disabling functionalities. - Added Ledger overview for financial transactions with filtering options. - Developed Order Detail view for individual order insights and refund capabilities. - Created Orders management page with search, reset, and pagination features. - Enhanced user experience with toast notifications for actions and error handling.
52 lines
905 B
Go
Executable File
52 lines
905 B
Go
Executable File
package web
|
|
|
|
import (
|
|
"quyun/v2/app/middlewares"
|
|
"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(
|
|
jwt *jwt.JWT,
|
|
) (*auth, error) {
|
|
obj := &auth{
|
|
jwt: jwt,
|
|
}
|
|
|
|
return obj, nil
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
if err := container.Container.Provide(func() (*me, error) {
|
|
obj := &me{}
|
|
|
|
return obj, nil
|
|
}); err != nil {
|
|
return err
|
|
}
|
|
if err := container.Container.Provide(func(
|
|
auth *auth,
|
|
me *me,
|
|
middlewares *middlewares.Middlewares,
|
|
) (contracts.HttpRoute, error) {
|
|
obj := &Routes{
|
|
auth: auth,
|
|
me: me,
|
|
middlewares: middlewares,
|
|
}
|
|
if err := obj.Prepare(); err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return obj, nil
|
|
}, atom.GroupRoutes); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|