fix: user wechat auth

This commit is contained in:
Rogee
2025-01-10 14:39:36 +08:00
parent 0d35aa15de
commit 3f227772fd
16 changed files with 273 additions and 100 deletions

View File

@@ -7,7 +7,9 @@ import (
"backend/providers/jwt"
"backend/providers/wechat"
"git.ipao.vip/rogeecn/atom"
"git.ipao.vip/rogeecn/atom/container"
"git.ipao.vip/rogeecn/atom/contracts"
"git.ipao.vip/rogeecn/atom/utils/opt"
)
@@ -32,6 +34,20 @@ func Provide(opts ...opt.Option) error {
}); err != nil {
return err
}
if err := container.Container.Provide(func(
controller *Controller,
) (contracts.HttpRoute, error) {
obj := &Routes{
controller: controller,
}
if err := obj.Prepare(); err != nil {
return nil, err
}
return obj, nil
}, atom.GroupRoutes); err != nil {
return err
}
if err := container.Container.Provide(func(
db *sql.DB,
) (*Service, error) {