Updated to latest arn API
This commit is contained in:
parent
681177b28e
commit
9aa3d9de62
@ -8,6 +8,6 @@ component ThreadLink(thread *arn.Thread)
|
||||
Icon("thumb-tack")
|
||||
a.thread-link-title(href="/thread/" + thread.ID)= thread.Title
|
||||
.spacer
|
||||
.thread-reply-count= len(thread.Posts)
|
||||
.thread-reply-count= len(thread.PostIDs)
|
||||
.thread-icons
|
||||
Icon(arn.GetForumIcon(thread.Tags[0]))
|
@ -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)
|
||||
|
@ -63,7 +63,8 @@ export function forumReply(arn: AnimeNotifier) {
|
||||
|
||||
let post = {
|
||||
text: textarea.value,
|
||||
threadId: thread.dataset.id,
|
||||
parentId: thread.dataset.id,
|
||||
parentType: "Thread",
|
||||
tags: []
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user