udpate
This commit is contained in:
@@ -56,11 +56,12 @@ func Command() atom.Option {
|
||||
type Service struct {
|
||||
dig.In
|
||||
|
||||
App *app.Config
|
||||
Job *job.Job
|
||||
Http *http.Service
|
||||
Initials []contracts.Initial `group:"initials"`
|
||||
Routes []contracts.HttpRoute `group:"routes"`
|
||||
App *app.Config
|
||||
Job *job.Job
|
||||
Middleware *middlewares.Middlewares
|
||||
Http *http.Service
|
||||
Initials []contracts.Initial `group:"initials"`
|
||||
Routes []contracts.HttpRoute `group:"routes"`
|
||||
}
|
||||
|
||||
func Serve(cmd *cobra.Command, args []string) error {
|
||||
@@ -76,6 +77,7 @@ func Serve(cmd *cobra.Command, args []string) error {
|
||||
svc.Http.Engine.Use(favicon.New(favicon.Config{
|
||||
Data: []byte{},
|
||||
}))
|
||||
svc.Http.Engine.Use(svc.Middleware.DebugMode)
|
||||
|
||||
for _, route := range svc.Routes {
|
||||
group := svc.Http.Engine.Group(route.Path(), route.Middlewares()...).Name(route.Name())
|
||||
|
||||
Reference in New Issue
Block a user