Some improvements
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
package forum
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
@ -14,8 +12,7 @@ const threadsPerPage = 20
|
||||
func Get(ctx *aero.Context) string {
|
||||
tag := ctx.Get("tag")
|
||||
threads, _ := arn.GetThreadsByTag(tag)
|
||||
|
||||
sort.Sort(threads)
|
||||
arn.SortThreads(threads)
|
||||
|
||||
if len(threads) > threadsPerPage {
|
||||
threads = threads[:threadsPerPage]
|
||||
|
Reference in New Issue
Block a user