Skip to content

Commit 9dff069

Browse files
committed
fix: convert []byte to string in activity log to prevent base64 encoding in JSON
1 parent 6006030 commit 9dff069

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internal/services/activity.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ func GetRecentActivity(userID int64, limit, offset int) (*ActivityResult, error)
6161
total = toInt(vals[i])
6262
continue
6363
}
64-
row[col] = vals[i]
64+
if b, ok := vals[i].([]byte); ok {
65+
row[col] = string(b)
66+
} else {
67+
row[col] = vals[i]
68+
}
6569
}
6670
activities = append(activities, row)
6771
}

0 commit comments

Comments
 (0)