2017-07-01 14:03:10 +02:00

23 lines
364 B
Go

package apiview
import (
"sort"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// Get api page.
func Get(ctx *aero.Context) string {
types := []string{}
for typeName := range arn.DB.Types() {
types = append(types, typeName)
}
sort.Strings(types)
return ctx.HTML(components.API(types))
}