Added characters page

This commit is contained in:
2018-04-22 17:43:20 +02:00
parent e8c66f28ab
commit 8a8b363e03
10 changed files with 203 additions and 9 deletions

View File

@ -0,0 +1,18 @@
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)
}