Upgrading posts to new data structure

This commit is contained in:
2018-10-29 08:12:34 +09:00
parent 84f650a636
commit 681177b28e
4 changed files with 26 additions and 5 deletions

View File

@ -72,6 +72,7 @@ func Characters(ctx *aero.Context) string {
func Forum(ctx *aero.Context) string {
term := ctx.Get("term")
term = strings.TrimPrefix(term, "/")
user := utils.GetUser(ctx)
var posts []*arn.Post
var threads []*arn.Thread
@ -82,7 +83,7 @@ func Forum(ctx *aero.Context) string {
threads = search.Threads(term, maxThreads)
})
return ctx.HTML(components.ForumSearchResults(posts, threads))
return ctx.HTML(components.ForumSearchResults(posts, threads, user))
}
// SoundTracks search.