This commit is contained in:
Untone 2024-03-02 13:56:57 +03:00
parent 11472d5b06
commit d9fd6c2b36

View File

@ -235,7 +235,11 @@ func (c *provider) GetUserAppDataFromRedis(userId string) (string, error) {
// Parse userProfileString into a UserProfile struct // Parse userProfileString into a UserProfile struct
var userProfile UserProfile var userProfile UserProfile
err = json.Unmarshal([]byte(userProfileString), &userProfile) err = json.Unmarshal([]byte(userProfileString), &userProfile.ID)
if err != nil {
// If the ID is not a number, try unmarshalling it as a string instead
err = json.Unmarshal([]byte(userProfileString), &userProfile.ID)
}
if err != nil { if err != nil {
return "", err return "", err
} }