fix: Move SetSessionConfig to App

This commit is contained in:
ptrcnull 2021-10-07 17:05:45 +02:00
parent e4fc2d9435
commit 3f4d185166
2 changed files with 6 additions and 1 deletions

4
app.go
View file

@ -91,3 +91,7 @@ func (app *App) Run(addr string) error {
func (app *App) AuthSupported() bool {
return len(app.authHandlers) > 0
}
func (app *App) SetSessionConfig(config session.Config) {
app.sessions = session.New(config)
}

View file

@ -57,6 +57,7 @@ func (mm *ModuleManager) SetHomepage(template string, handlers ...func(map[strin
mm.app.homepageHandlers = handlers
}
// Deprecated: SetSessionConfig is deprecated, use app.SetSessionConfig
func (mm *ModuleManager) SetSessionConfig(config session.Config) {
mm.app.sessions = session.New(config)
mm.app.SetSessionConfig(config)
}