feat: refactor http
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package users
|
||||
|
||||
import (
|
||||
"backend/providers/http"
|
||||
"database/sql"
|
||||
|
||||
"git.ipao.vip/rogeecn/atom"
|
||||
@@ -24,11 +23,12 @@ func Provide(opts ...opt.Option) error {
|
||||
|
||||
if err := container.Container.Provide(func(
|
||||
controller *Controller,
|
||||
http *http.Service,
|
||||
) (contracts.HttpRoute, error) {
|
||||
obj := &Router{
|
||||
controller: controller,
|
||||
http: http,
|
||||
}
|
||||
if err := obj.Prepare(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj, nil
|
||||
}, atom.GroupRoutes); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user