From 040f7ead7e613b498b7c7a02a76d767b170575cf Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 2 Mar 2024 10:12:05 +0300 Subject: [PATCH] appdata-debug-3 --- server/memorystore/providers/redis/store.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/memorystore/providers/redis/store.go b/server/memorystore/providers/redis/store.go index c15ba04..89c30f4 100644 --- a/server/memorystore/providers/redis/store.go +++ b/server/memorystore/providers/redis/store.go @@ -228,8 +228,10 @@ type UserProfile struct { // GetUserAppDataFromRedis retrieves user profile and follows from Redis, combines them into a JSON format, // and assigns the JSON string to the provided user's ID. func (c *provider) GetUserAppDataFromRedis(userId string) (string, error) { - // Retrieve user data from Redis - userProfileString := c.store.Get(c.ctx, fmt.Sprintf(`user:%s:author`, userId)) + userProfileString, err := c.store.Get(c.ctx, fmt.Sprintf(`user:%s:author`, userId)).Result() + if err != nil { + return "", err + } // Parse userProfileString into a UserProfile struct var userProfile UserProfile