Updated dashboard

This commit is contained in:
FM1337
2017-06-24 18:57:36 -03:00
parent cb01452c44
commit 1cd798e947
2 changed files with 16 additions and 9 deletions

View File

@ -31,10 +31,16 @@ func Get(ctx *aero.Context) string {
posts = posts[:maxPosts]
}
userList, err := arn.DB.GetMany("User", user.Following[:maxFollowing])
followIDList := user.Following
if len(followIDList) > maxFollowing {
followIDList = followIDList[:maxFollowing]
}
userList, err := arn.DB.GetMany("User", followIDList)
if err != nil {
return ctx.Error(500, "Error fetching following", err)
return ctx.Error(500, "Error fetching followers", err)
}
followingList := userList.([]*arn.User)