Updated to latest arn API

This commit is contained in:
2018-10-29 09:15:45 +09:00
parent 681177b28e
commit 9aa3d9de62
3 changed files with 4 additions and 8 deletions

View File

@ -22,12 +22,7 @@ func Get(ctx *aero.Context) string {
}
// Fetch posts
postObjects := arn.DB.GetMany("Post", thread.Posts)
posts := make([]*arn.Post, len(postObjects))
for i, obj := range postObjects {
posts[i] = obj.(*arn.Post)
}
posts := thread.Posts()
// Sort posts
arn.SortPostsLatestLast(posts)