type-fix
This commit is contained in:
parent
11472d5b06
commit
d9fd6c2b36
|
@ -235,7 +235,11 @@ func (c *provider) GetUserAppDataFromRedis(userId string) (string, error) {
|
|||
|
||||
// Parse userProfileString into a UserProfile struct
|
||||
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 {
|
||||
return "", err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user