fix: issues
This commit is contained in:
@@ -1,13 +1,28 @@
|
||||
package middlewares
|
||||
|
||||
import (
|
||||
"backend/providers/app"
|
||||
"backend/providers/jwt"
|
||||
"backend/providers/storage"
|
||||
"backend/providers/wechat"
|
||||
|
||||
"git.ipao.vip/rogeecn/atom/container"
|
||||
"git.ipao.vip/rogeecn/atom/utils/opt"
|
||||
)
|
||||
|
||||
func Provide(opts ...opt.Option) error {
|
||||
if err := container.Container.Provide(func() (*Middlewares, error) {
|
||||
obj := &Middlewares{}
|
||||
if err := container.Container.Provide(func(
|
||||
app *app.Config,
|
||||
client *wechat.Client,
|
||||
jwt *jwt.JWT,
|
||||
storagePath *storage.Config,
|
||||
) (*Middlewares, error) {
|
||||
obj := &Middlewares{
|
||||
app: app,
|
||||
client: client,
|
||||
jwt: jwt,
|
||||
storagePath: storagePath,
|
||||
}
|
||||
if err := obj.Prepare(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user