fix(services): Fix service startup failures
- Remove duplicate CoreModule() calls from all service main.go files - NewContainer() already includes CoreModule() automatically - This was causing duplicate ConfigProvider provider errors - Update all _fx.go files to use *database.Client instead of *ent.Client - database.Client embeds *ent.Client, so it can be used directly - This fixes type mismatches between providers and consumers - Keep ent import for constants like ent.Desc - All services now build and should start successfully
This commit is contained in:
@@ -81,10 +81,8 @@ func (s *grpcServerWrapper) Port() int {
|
||||
|
||||
func main() {
|
||||
// Create DI container
|
||||
// Note: CoreModule() is automatically included by NewContainer()
|
||||
container := di.NewContainer(
|
||||
// Core kernel services
|
||||
di.CoreModule(),
|
||||
|
||||
// Database for auth service (auth schema)
|
||||
fx.Provide(func(cfg config.ConfigProvider, log logger.Logger) (*database.Client, error) {
|
||||
dsn := cfg.GetString("database.dsn")
|
||||
|
||||
Reference in New Issue
Block a user