Updated dashboard with new aerogo/aerospike version

This commit is contained in:
Eduard Urbach 2017-06-25 17:16:13 +02:00
parent d9656bf950
commit 280cd1268e

View File

@ -34,19 +34,17 @@ func Get(ctx *aero.Context) string {
followIDList := user.Following followIDList := user.Following
var followingList []*arn.User var followingList []*arn.User
if len(followIDList) > 0 { if len(followIDList) > maxFollowing {
if len(followIDList) > maxFollowing { followIDList = followIDList[:maxFollowing]
followIDList = followIDList[:maxFollowing]
}
userList, err := arn.DB.GetMany("User", followIDList)
if err != nil {
return ctx.Error(500, "Error fetching followed users", err)
}
followingList = userList.([]*arn.User)
} }
userList, err := arn.DB.GetMany("User", followIDList)
if err != nil {
return ctx.Error(500, "Error fetching followed users", err)
}
followingList = userList.([]*arn.User)
return ctx.HTML(components.Dashboard(posts, followingList)) return ctx.HTML(components.Dashboard(posts, followingList))
} }