19 lines
294 B
Go
Raw Normal View History

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