2018-11-22 01:27:53 +00:00
|
|
|
package groups
|
|
|
|
|
|
|
|
import (
|
|
|
|
"sort"
|
|
|
|
|
|
|
|
"github.com/aerogo/aero"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Latest shows the latest groups.
|
2019-06-01 04:55:49 +00:00
|
|
|
func Latest(ctx aero.Context) error {
|
2018-11-22 02:51:44 +00:00
|
|
|
groups := fetchGroups("")
|
2018-11-22 01:27:53 +00:00
|
|
|
|
|
|
|
sort.Slice(groups, func(i, j int) bool {
|
|
|
|
return groups[i].Created > groups[j].Created
|
|
|
|
})
|
|
|
|
|
|
|
|
return render(ctx, groups)
|
|
|
|
}
|