Skip to content

Commit f5e2c98

Browse files
committed
fix null arrays so profile page works.
1 parent dfa1c68 commit f5e2c98

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

api/dbv1/full_followee_actions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
func fullFolloweeReposts(raw json.RawMessage) []*FolloweeRepost {
10-
var followeeReposts []*FolloweeRepost
10+
followeeReposts := []*FolloweeRepost{}
1111
if err := json.Unmarshal(raw, &followeeReposts); err == nil {
1212
for _, r := range followeeReposts {
1313
r.RepostItemId = trashid.StringEncode(r.RepostItemId)
@@ -18,7 +18,7 @@ func fullFolloweeReposts(raw json.RawMessage) []*FolloweeRepost {
1818
}
1919

2020
func fullFolloweeFavorites(raw json.RawMessage) []*FolloweeFavorite {
21-
var followeeFavorites []*FolloweeFavorite
21+
followeeFavorites := []*FolloweeFavorite{}
2222
if err := json.Unmarshal(raw, &followeeFavorites); err == nil {
2323
for _, r := range followeeFavorites {
2424
r.FavoriteItemId = trashid.StringEncode(r.FavoriteItemId)

api/dbv1/get_tracks.sql.go

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/dbv1/queries/get_tracks.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ SELECT
113113
-- followee_favorites,
114114
-- route_id,
115115
stem_of,
116-
-- track_segments, todo: can we just get rid of this now?
116+
track_segments, -- todo: can we just get rid of this now?
117117
t.updated_at,
118118
t.owner_id as user_id,
119119
t.is_delete,

0 commit comments

Comments
 (0)