fix: Move SetSessionConfig to App
This commit is contained in:
parent
e4fc2d9435
commit
3f4d185166
2 changed files with 6 additions and 1 deletions
4
app.go
4
app.go
|
@ -91,3 +91,7 @@ func (app *App) Run(addr string) error {
|
||||||
func (app *App) AuthSupported() bool {
|
func (app *App) AuthSupported() bool {
|
||||||
return len(app.authHandlers) > 0
|
return len(app.authHandlers) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (app *App) SetSessionConfig(config session.Config) {
|
||||||
|
app.sessions = session.New(config)
|
||||||
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ func (mm *ModuleManager) SetHomepage(template string, handlers ...func(map[strin
|
||||||
mm.app.homepageHandlers = handlers
|
mm.app.homepageHandlers = handlers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deprecated: SetSessionConfig is deprecated, use app.SetSessionConfig
|
||||||
func (mm *ModuleManager) SetSessionConfig(config session.Config) {
|
func (mm *ModuleManager) SetSessionConfig(config session.Config) {
|
||||||
mm.app.sessions = session.New(config)
|
mm.app.SetSessionConfig(config)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue