feat: refactor http

This commit is contained in:
Rogee
2024-12-06 16:53:33 +08:00
parent 7d9ec4ef81
commit 29894cff9c
6 changed files with 82 additions and 30 deletions

View File

@@ -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 {