fixed
This commit is contained in:
@@ -105,13 +105,18 @@ func GetUserAttributes(userID string) (map[string]string, error) {
|
||||
|
||||
attributes := make(map[string]string)
|
||||
for rows.Next() {
|
||||
var name, value string
|
||||
var name string
|
||||
var value *string
|
||||
err := rows.Scan(&name, &value)
|
||||
if err != nil {
|
||||
log.Printf("[Repository] ✗ Error scanning user attribute: %v", err)
|
||||
return nil, fmt.Errorf("error scanning user attribute: %w", err)
|
||||
}
|
||||
attributes[name] = value
|
||||
if value != nil {
|
||||
attributes[name] = *value
|
||||
} else {
|
||||
attributes[name] = ""
|
||||
}
|
||||
}
|
||||
|
||||
log.Printf("[Repository] ✓ Retrieved %d user attributes", len(attributes))
|
||||
|
||||
Reference in New Issue
Block a user