19 lines
288 B
Go
Raw Normal View History

2018-11-22 01:27:53 +00:00
package groups
import (
"sort"
"github.com/aerogo/aero"
)
// Latest shows the latest groups.
func Latest(ctx *aero.Context) string {
groups := fetchGroups()
sort.Slice(groups, func(i, j int) bool {
return groups[i].Created > groups[j].Created
})
return render(ctx, groups)
}