refactor: we dont need to register the router
This commit is contained in:
parent
8c89796341
commit
80484079d6
|
@ -3,7 +3,6 @@ package api
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.lumeweb.com/LumeWeb/portal/api/registry"
|
"git.lumeweb.com/LumeWeb/portal/api/registry"
|
||||||
"git.lumeweb.com/LumeWeb/portal/api/router"
|
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"go.uber.org/fx"
|
"go.uber.org/fx"
|
||||||
|
@ -39,9 +38,7 @@ func BuildApis(config *viper.Viper) fx.Option {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return fx.Module("api", fx.Options(options...), fx.Provide(func() router.ProtocolRouter {
|
return fx.Module("api", fx.Options(options...))
|
||||||
return registry.GetRouter()
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetupLifecycles(lifecycle fx.Lifecycle, protocols []registry.API) {
|
func SetupLifecycles(lifecycle fx.Lifecycle, protocols []registry.API) {
|
||||||
|
|
Loading…
Reference in New Issue