🎨 updated error handling logic

This commit is contained in:
landaiqing
2024-11-18 01:12:50 +08:00
parent 78a162a19a
commit 35d2da35b2
48 changed files with 395 additions and 170 deletions

View File

@@ -13,12 +13,7 @@ import (
"schisandra-album-cloud-microservices/app/core/api/internal/types"
)
func NewRedisSession(addr string, password string) *redisstore.RedisStore {
client := redis.NewClient(&redis.Options{
Addr: addr,
Password: password,
DB: 0,
})
func NewRedisSession(client *redis.Client) *redisstore.RedisStore {
store, err := redisstore.NewRedisStore(context.Background(), client)
if err != nil {
panic(err)