Fixed dashboard

This commit is contained in:
Eduard Urbach 2017-07-21 11:46:49 +02:00
parent 0d9b6330ee
commit b7786b1d51

View File

@ -30,7 +30,6 @@ func Get(ctx *aero.Context) string {
// Render the dashboard. // Render the dashboard.
func dashboard(ctx *aero.Context) string { func dashboard(ctx *aero.Context) string {
var forumActivity []arn.Postable var forumActivity []arn.Postable
var userList interface{}
var followingList []*arn.User var followingList []*arn.User
var soundTracks []*arn.SoundTrack var soundTracks []*arn.SoundTrack
var upcomingEpisodes []*arn.UpcomingEpisode var upcomingEpisodes []*arn.UpcomingEpisode
@ -80,14 +79,7 @@ func dashboard(ctx *aero.Context) string {
soundTracks = soundTracks[:maxSoundTracks] soundTracks = soundTracks[:maxSoundTracks]
} }
}, func() { }, func() {
var err error followingList = user.Follows().Users()
userList, err = arn.DB.GetMany("User", user.Following)
if err != nil {
return
}
followingList = userList.([]*arn.User)
arn.SortUsersLastSeen(followingList) arn.SortUsersLastSeen(followingList)
if len(followingList) > maxFollowing { if len(followingList) > maxFollowing {