refactor: we dont need to register the router

This commit is contained in:
Derrick Hammer 2024-01-28 03:03:04 -05:00
parent 8c89796341
commit 80484079d6
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 4 deletions

View File

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