From 800fc4f8d875061e16622d486ae66f68389cda0d Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 5 Jun 2024 22:17:18 +0300 Subject: [PATCH] fixed-redis-intfix4 --- server/memorystore/providers/redis/store.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/memorystore/providers/redis/store.go b/server/memorystore/providers/redis/store.go index 11262ea..10fd46f 100644 --- a/server/memorystore/providers/redis/store.go +++ b/server/memorystore/providers/redis/store.go @@ -3,6 +3,7 @@ package redis import ( "fmt" "strconv" + "strings" "time" "errors" "encoding/json" @@ -232,7 +233,7 @@ type AuthorProfile struct { // and assigns the JSON string to the provided user's ID. func (c *provider) GetUserAppDataFromRedis(userId string) (string, error) { // Получаем профиль автора из Redis - rkey := fmt.Sprintf("author:user:%s", userId) + rkey := fmt.Sprintf("author:user:%s", strings.TrimSpace(userId)) authorProfileString, err := c.store.Get(c.ctx, rkey).Result() if err != nil { fmt.Println("redis GET:", rkey)