appdata-debug-3

This commit is contained in:
Untone 2024-03-02 10:12:05 +03:00
parent 3246d32a23
commit 040f7ead7e

View File

@ -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