19 lines
296 B
Go
Raw Normal View History

2018-04-22 15:43:20 +00:00
package characters
import (
"sort"
"github.com/aerogo/aero"
)
// Latest characters.
func Latest(ctx *aero.Context) string {
characters := fetchAll()
sort.Slice(characters, func(i, j int) bool {
return characters[i].Created > characters[j].Created
})
return render(ctx, characters)
}