mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-06-23 03:40:15 +00:00
feat: inject runtime helpers to controllers and services
This commit is contained in:
@@ -294,6 +294,14 @@ func (app *BootstrapApp) Setup() error {
|
||||
// runtime helpers
|
||||
app.helpers.GetCookieDomain = app.getCookieDomain
|
||||
|
||||
err = app.dig.Provide(func() *model.RuntimeHelpers {
|
||||
return &app.helpers
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to provide runtime helpers to container: %w", err)
|
||||
}
|
||||
|
||||
// setup router
|
||||
err = app.setupRouter()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user