move redis config over to config file

This commit is contained in:
Gregory Wells
2026-06-08 18:54:31 -04:00
parent 40429d7618
commit 109199ea45
5 changed files with 21 additions and 12 deletions
+4 -2
View File
@@ -33,7 +33,7 @@ func GetSessionManager() *SessionManager {
return instance
}
func (manager *SessionManager) SetStoreType(storeType StoreType) {
func (manager *SessionManager) SetStoreType(storeType StoreType, params ...any) {
logging.Infof("Changing session manager store type")
switch storeType {
case InMemory:
@@ -47,7 +47,9 @@ func (manager *SessionManager) SetStoreType(storeType StoreType) {
}
case Redis:
{
manager.store = store.NewRedisStore[*SessionData]()
url, _ := params[0].(string)
prefix, _ := params[1].(string)
manager.store = store.NewRedisStore[*SessionData](url, prefix)
break
}
}