From 7d5d31692f036fae66d49a2513b1befd1061c7e3 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 5 Jun 2024 22:10:43 +0300 Subject: [PATCH] fixed-redis-intfix2 --- server/memorystore/providers/redis/store.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/memorystore/providers/redis/store.go b/server/memorystore/providers/redis/store.go index 87a32df..dcf384c 100644 --- a/server/memorystore/providers/redis/store.go +++ b/server/memorystore/providers/redis/store.go @@ -246,13 +246,12 @@ func (c *provider) GetUserAppDataFromRedis(userId string) (string, error) { if err != nil { return "", err } - - authorId, ok := authorProfileMap["id"].(float64) - authorId = int(authorId) - if !ok { - fmt.Println("Ошибка: id не найден или неверного типа") - return "", errors.New("id not found or is of incorrect type") - } + + authorIdFloat, ok := authorProfileMap["id"].(float64) + if !ok { + return "", errors.New("id not found or is of incorrect type") + } + authorId := int(authorIdFloat) // Начинаем сбор данных в общий JSON combinedData := map[string]interface{}{