mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-06-15 07:50:14 +00:00
feat: use dig for controllers
This commit is contained in:
@@ -229,7 +229,7 @@ func (app *BootstrapApp) Setup() error {
|
||||
Queries repository.Store
|
||||
}
|
||||
|
||||
app.dig.Provide(func() utilityProvider {
|
||||
err = app.dig.Provide(func() utilityProvider {
|
||||
return utilityProvider{
|
||||
Log: app.log,
|
||||
Config: &app.config,
|
||||
@@ -240,6 +240,10 @@ func (app *BootstrapApp) Setup() error {
|
||||
}
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to provide utilities to container: %w", err)
|
||||
}
|
||||
|
||||
// services
|
||||
err = app.setupServices()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user